From e8f142f215c1d60b4a0642e438bafda3d0e861cb Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 29 Apr 2025 06:07:49 +0000 Subject: [PATCH] CodeGen from PR 34227 in Azure/azure-rest-api-specs Merge 32cf7d0faaa8c6318af239c23046d42983ca881d into c5c1929b24a2d40130a10058757763ab3568c40f --- .../CHANGELOG.md | 973 ++++++- .../README.md | 8 +- .../SAMPLE.md | 1843 +++++++++---- .../azure-resourcemanager-providerhub/pom.xml | 4 +- .../providerhub/ProviderHubManager.java | 78 +- .../fluent/AuthorizedApplicationsClient.java | 162 ++ .../fluent/CustomRolloutsClient.java | 95 +- .../fluent/DefaultRolloutsClient.java | 8 +- .../NewRegionFrontloadReleasesClient.java | 129 + .../NotificationRegistrationsClient.java | 4 +- .../providerhub/fluent/OperationsClient.java | 9 +- .../providerhub/fluent/ProviderHub.java | 28 + .../fluent/ProviderMonitorSettingsClient.java | 217 ++ .../fluent/ResourceActionsClient.java | 76 + .../ResourceTypeRegistrationsClient.java | 32 +- .../models/AuthorizedApplicationInner.java | 167 ++ .../models/CheckinManifestInfoInner.java | 26 +- .../fluent/models/CustomRolloutInner.java | 19 +- .../fluent/models/DefaultRolloutInner.java | 19 +- .../models/NotificationRegistrationInner.java | 19 +- .../fluent/models/OperationsContentInner.java | 278 -- .../models/OperationsDefinitionInner.java | 12 +- .../models/OperationsPutContentInner.java | 166 ++ .../models/ProviderMonitorSettingInner.java | 193 ++ .../models/ProviderRegistrationInner.java | 61 + .../models/ResourceProviderManifestInner.java | 310 ++- .../models/ResourceTypeRegistrationInner.java | 50 + .../fluent/models/SkuResourceInner.java | 17 + .../fluent/models/package-info.java | 2 +- .../providerhub/fluent/package-info.java | 2 +- .../AuthorizedApplicationImpl.java | 124 + .../AuthorizedApplicationsClientImpl.java | 766 ++++++ .../AuthorizedApplicationsImpl.java | 141 + .../implementation/CustomRolloutImpl.java | 26 +- .../CustomRolloutsClientImpl.java | 376 ++- .../implementation/CustomRolloutsImpl.java | 45 + .../implementation/DefaultRolloutImpl.java | 5 + .../DefaultRolloutsClientImpl.java | 20 +- .../NewRegionFrontloadReleasesClientImpl.java | 590 +++++ .../NewRegionFrontloadReleasesImpl.java | 109 + .../NotificationRegistrationImpl.java | 5 + .../NotificationRegistrationsClientImpl.java | 12 +- .../implementation/OperationsClientImpl.java | 26 +- .../implementation/OperationsContentImpl.java | 67 - .../implementation/OperationsImpl.java | 18 +- .../OperationsPutContentImpl.java | 50 + .../implementation/ProviderHubImpl.java | 66 +- .../ProviderMonitorSettingImpl.java | 140 + .../ProviderMonitorSettingsClientImpl.java | 1109 ++++++++ .../ProviderMonitorSettingsImpl.java | 171 ++ .../ProviderRegistrationImpl.java | 10 + .../ResourceActionsClientImpl.java | 309 +++ .../implementation/ResourceActionsImpl.java | 43 + .../ResourceProviderManifestImpl.java | 48 + .../ResourceTypeRegistrationImpl.java | 15 + .../ResourceTypeRegistrationsClientImpl.java | 103 +- .../ResourceTypeRegistrationsImpl.java | 15 +- .../implementation/SkuResourceImpl.java | 5 + .../implementation/package-info.java | 2 +- .../models/AdditionalAuthorization.java | 121 + .../providerhub/models/AdditionalOptions.java | 53 + .../AdditionalOptionsAsyncOperation.java | 53 + ...tionalOptionsResourceTypeRegistration.java | 54 + .../models/AllowedResourceName.java | 121 + .../AllowedUnauthorizedActionsExtension.java | 123 + .../providerhub/models/ApiProfile.java | 121 + .../models/ApplicationDataAuthorization.java | 144 + .../ApplicationProviderAuthorization.java | 122 + .../models/AsyncOperationPollingRules.java | 126 + .../providerhub/models/AsyncTimeoutRule.java | 121 + .../models/AuthenticationScheme.java | 51 + .../models/AuthorizationActionMapping.java | 12 +- .../models/AuthorizedApplication.java | 181 ++ ...licationArrayResponseWithContinuation.java | 131 + .../AuthorizedApplicationProperties.java | 154 ++ .../models/AuthorizedApplications.java | 142 + .../models/AvailabilityZonePolicy.java | 56 + .../AvailableCheckInManifestEnvironment.java | 72 + .../providerhub/models/BlockActionVerb.java | 71 + ...naryTrafficRegionRolloutConfiguration.java | 12 +- .../providerhub/models/CapacityPolicy.java | 51 + .../CheckNameAvailabilitySpecifications.java | 12 +- .../models/CheckinManifestInfo.java | 8 +- .../models/CommonApiVersionsMergeMode.java | 51 + .../models/CrossTenantTokenValidation.java | 51 + .../providerhub/models/CustomRollout.java | 28 + .../models/CustomRolloutProperties.java | 81 +- .../CustomRolloutPropertiesAutoGenerated.java | 168 -- .../CustomRolloutPropertiesSpecification.java | 71 +- .../models/CustomRolloutPropertiesStatus.java | 19 +- .../models/CustomRolloutSpecification.java | 153 +- ...lloutSpecificationAutoProvisionConfig.java | 125 + .../CustomRolloutSpecificationCanary.java | 2 +- ...loutSpecificationProviderRegistration.java | 33 +- .../models/CustomRolloutStatus.java | 45 +- ...tomRolloutStatusManifestCheckinStatus.java | 124 + .../providerhub/models/CustomRollouts.java | 70 + .../providerhub/models/DataBoundary.java | 61 + .../providerhub/models/DefaultRollout.java | 8 + .../models/DefaultRolloutProperties.java | 81 +- ...DefaultRolloutPropertiesAutoGenerated.java | 161 -- ...DefaultRolloutPropertiesSpecification.java | 38 +- .../DefaultRolloutPropertiesStatus.java | 19 +- .../models/DefaultRolloutSpecification.java | 116 +- ...lloutSpecificationAutoProvisionConfig.java | 125 + .../DefaultRolloutSpecificationCanary.java | 2 +- ...tRolloutSpecificationExpeditedRollout.java | 79 + ...efaultRolloutSpecificationHighTraffic.java | 2 +- ...DefaultRolloutSpecificationLowTraffic.java | 2 +- ...aultRolloutSpecificationMediumTraffic.java | 2 +- ...loutSpecificationProviderRegistration.java | 34 +- ...utSpecificationRestOfTheWorldGroupOne.java | 2 +- ...utSpecificationRestOfTheWorldGroupTwo.java | 2 +- .../models/DefaultRolloutStatus.java | 51 +- ...ultRolloutStatusManifestCheckinStatus.java | 124 + .../providerhub/models/DeleteDependency.java | 152 ++ .../providerhub/models/DstsConfiguration.java | 129 + .../models/EndpointInformation.java | 150 ++ .../providerhub/models/EndpointType.java | 61 + .../models/EndpointTypeResourceType.java | 61 + .../providerhub/models/Error.java | 208 -- .../providerhub/models/ErrorInnerError.java | 112 - .../models/ExpeditedRolloutDefinition.java | 93 + .../models/ExpeditedRolloutIntent.java | 51 + .../providerhub/models/ExtendedErrorInfo.java | 32 +- .../models/ExtendedLocationOptions.java | 28 +- .../models/ExtendedLocationType.java | 60 +- .../providerhub/models/ExtensionCategory.java | 11 + .../providerhub/models/ExtensionOptions.java | 12 +- .../models/FanoutLinkedNotificationRule.java | 193 ++ ...nkedNotificationRuleDstsConfiguration.java | 99 + .../providerhub/models/FeaturesPolicy.java | 2 +- .../providerhub/models/FeaturesRule.java | 6 +- .../providerhub/models/FilterOption.java | 52 + .../providerhub/models/FilterRule.java | 128 + .../models/FrontdoorRequestMode.java | 51 + .../providerhub/models/FrontloadPayload.java | 103 + .../models/FrontloadPayloadProperties.java | 450 ++++ ...PropertiesOverrideEndpointLevelFields.java | 292 ++ ...PropertiesOverrideManifestLevelFields.java | 88 + .../models/IdentityManagement.java | 6 +- .../models/IdentityManagementProperties.java | 73 +- .../models/IdentityManagementTypes.java | 2 +- .../providerhub/models/InnerError.java | 157 -- .../providerhub/models/Intent.java | 61 + .../models/LegacyDisallowedCondition.java | 125 + .../providerhub/models/LegacyOperation.java | 91 + .../models/LightHouseAuthorization.java | 12 +- .../providerhub/models/LinkedAccessCheck.java | 30 +- .../providerhub/models/LinkedAction.java | 2 +- .../models/LinkedNotificationRule.java | 218 ++ .../providerhub/models/LinkedOperation.java | 2 +- .../models/LinkedOperationRule.java | 43 +- .../models/LocalizedOperationDefinition.java | 223 ++ .../LocalizedOperationDefinitionDisplay.java | 363 +++ .../LocalizedOperationDisplayDefinition.java | 651 +++++ ...LocalizedOperationDisplayDefinitionCs.java | 138 + ...LocalizedOperationDisplayDefinitionDe.java | 138 + ...izedOperationDisplayDefinitionDefault.java | 138 + ...LocalizedOperationDisplayDefinitionEn.java | 138 + ...LocalizedOperationDisplayDefinitionEs.java | 138 + ...LocalizedOperationDisplayDefinitionFr.java | 138 + ...LocalizedOperationDisplayDefinitionHu.java | 138 + ...LocalizedOperationDisplayDefinitionIt.java | 138 + ...LocalizedOperationDisplayDefinitionJa.java | 138 + ...LocalizedOperationDisplayDefinitionKo.java | 138 + ...LocalizedOperationDisplayDefinitionNl.java | 138 + ...LocalizedOperationDisplayDefinitionPl.java | 138 + ...LocalizedOperationDisplayDefinitionPt.java | 138 + ...calizedOperationDisplayDefinitionPtBR.java | 138 + ...LocalizedOperationDisplayDefinitionRu.java | 138 + ...LocalizedOperationDisplayDefinitionSv.java | 138 + ...lizedOperationDisplayDefinitionZhHans.java | 138 + ...lizedOperationDisplayDefinitionZhHant.java | 138 + .../providerhub/models/LocationQuotaRule.java | 149 ++ .../providerhub/models/LoggingDetails.java | 2 +- .../providerhub/models/LoggingDirections.java | 2 +- .../models/LoggingHiddenPropertyPath.java | 12 +- .../providerhub/models/LoggingRule.java | 24 +- .../LoggingRuleHiddenPropertyPaths.java | 2 +- .../models/ManifestLevelPropertyBag.java | 101 + .../ManifestResourceDeletionPolicy.java | 2 +- .../providerhub/models/MarketplaceType.java | 2 +- .../providerhub/models/MessageScope.java | 2 +- .../models/NewRegionFrontloadReleases.java | 116 + .../providerhub/models/Notification.java | 123 + .../models/NotificationEndpoint.java | 12 +- .../models/NotificationEndpointType.java | 51 + .../providerhub/models/NotificationMode.java | 2 +- .../models/NotificationOptions.java | 56 + .../models/NotificationRegistration.java | 8 + ...strationArrayResponseWithContinuation.java | 6 +- .../NotificationRegistrationProperties.java | 133 +- ...onRegistrationPropertiesAutoGenerated.java | 223 -- .../providerhub/models/NotificationType.java | 51 + .../models/OpenApiConfiguration.java | 96 + .../providerhub/models/OpenApiValidation.java | 96 + .../models/OperationActionType.java | 2 +- .../providerhub/models/OperationOrigins.java | 2 +- .../providerhub/models/Operations.java | 7 +- .../providerhub/models/OperationsContent.java | 82 - .../models/OperationsContentProperties.java | 99 + .../models/OperationsDefinition.java | 4 +- ...finitionArrayResponseWithContinuation.java | 6 +- .../models/OperationsDisplayDefinition.java | 24 +- .../models/OperationsPutContent.java | 100 +- .../OperationsPutContentProperties.java | 84 + .../providerhub/models/OptInHeaderType.java | 38 +- .../providerhub/models/OptOutHeaderType.java | 52 + .../providerhub/models/Policy.java | 51 + .../models/PolicyExecutionType.java | 61 + .../PrivateResourceProviderConfiguration.java | 97 + .../models/ProviderHubMetadata.java | 104 +- ...iderHubMetadataProviderAuthentication.java | 2 +- ...tadataThirdPartyProviderAuthorization.java | 2 +- .../models/ProviderMonitorSetting.java | 200 ++ ...rSettingArrayResponseWithContinuation.java | 131 + .../ProviderMonitorSettingProperties.java | 83 + .../models/ProviderMonitorSettings.java | 193 ++ .../models/ProviderRegistration.java | 16 + ...strationArrayResponseWithContinuation.java | 6 +- .../models/ProviderRegistrationKind.java | 57 + .../ProviderRegistrationProperties.java | 459 +++- ...erRegistrationPropertiesAutoGenerated.java | 355 --- ...sPrivateResourceProviderConfiguration.java | 86 + ...strationPropertiesProviderHubMetadata.java | 44 +- ...onLifecycleNotificationSpecifications.java | 2 +- .../providerhub/models/QuotaPolicy.java | 56 + .../providerhub/models/QuotaRule.java | 157 ++ .../ReRegisterSubscriptionMetadata.java | 12 +- .../providerhub/models/Readiness.java | 86 + .../providerhub/models/Regionality.java | 2 +- .../models/RequestHeaderOptions.java | 34 +- .../models/ResourceAccessPolicy.java | 2 +- .../models/ResourceAccessRole.java | 125 + .../providerhub/models/ResourceActions.java | 38 + .../ResourceConcurrencyControlOption.java | 94 + .../models/ResourceDeletionPolicy.java | 2 +- .../models/ResourceGraphConfiguration.java | 121 + .../models/ResourceHydrationAccount.java | 178 ++ .../models/ResourceManagementAction.java | 99 + .../models/ResourceManagementEntity.java | 174 ++ .../models/ResourceMovePolicy.java | 18 +- .../ResourceProviderAuthentication.java | 6 +- .../models/ResourceProviderAuthorization.java | 115 +- ...erAuthorizationManagedByAuthorization.java | 169 ++ .../ResourceProviderAuthorizationRules.java | 99 + .../models/ResourceProviderCapabilities.java | 18 +- .../ResourceProviderCapabilitiesEffect.java | 2 +- .../models/ResourceProviderEndpoint.java | 98 +- .../ResourceProviderEndpointFeaturesRule.java | 2 +- .../models/ResourceProviderManagement.java | 274 +- ...ManagementErrorResponseMessageOptions.java | 99 + ...derManagementExpeditedRolloutMetadata.java | 128 + .../models/ResourceProviderManifest.java | 77 +- .../ResourceProviderManifestFeaturesRule.java | 2 +- .../ResourceProviderManifestManagement.java | 113 +- .../ResourceProviderManifestProperties.java | 680 ++++- ...erManifestPropertiesDstsConfiguration.java | 102 + ...roviderManifestPropertiesFeaturesRule.java | 2 +- ...eProviderManifestPropertiesManagement.java | 118 +- ...anifestPropertiesNotificationSettings.java | 105 + ...ifestPropertiesProviderAuthentication.java | 2 +- ...anifestPropertiesRequestHeaderOptions.java | 15 +- ...tiesResourceGroupLockOptionDuringMove.java | 102 + ...iderManifestPropertiesResponseOptions.java | 98 + ...stPropertiesTemplateDeploymentOptions.java | 2 +- ...roviderManifestProviderAuthentication.java | 2 +- ...anifestReRegisterSubscriptionMetadata.java | 2 +- ...eProviderManifestRequestHeaderOptions.java | 15 +- .../models/ResourceProviderService.java | 121 + .../models/ResourceProviderType.java | 2 +- .../providerhub/models/ResourceSubType.java | 51 + .../providerhub/models/ResourceType.java | 369 ++- .../models/ResourceTypeCategory.java | 61 + .../models/ResourceTypeEndpoint.java | 308 ++- .../models/ResourceTypeEndpointBase.java | 474 ++++ ...urceTypeEndpointBaseDstsConfiguration.java | 99 + .../ResourceTypeEndpointBaseFeaturesRule.java | 89 + ...ResourceTypeEndpointDstsConfiguration.java | 99 + .../ResourceTypeEndpointFeaturesRule.java | 2 +- .../models/ResourceTypeEndpointKind.java | 52 + .../ResourceTypeExtendedLocationPolicy.java | 51 + .../models/ResourceTypeExtension.java | 18 +- .../models/ResourceTypeExtensionOptions.java | 6 +- ...ExtensionOptionsResourceCreationBegin.java | 2 +- .../models/ResourceTypeFeaturesRule.java | 2 +- .../ResourceTypeIdentityManagement.java | 2 +- .../models/ResourceTypeOnBehalfOfToken.java | 121 + .../models/ResourceTypeRegistration.java | 50 +- ...strationArrayResponseWithContinuation.java | 6 +- .../models/ResourceTypeRegistrationKind.java | 57 + .../ResourceTypeRegistrationProperties.java | 2339 +++++++++++++++-- ...peRegistrationPropertiesAutoGenerated.java | 1008 ------- ...trationPropertiesAvailabilityZoneRule.java | 99 + ...ypeRegistrationPropertiesCapacityRule.java | 125 + ...esCheckNameAvailabilitySpecifications.java | 2 +- ...gistrationPropertiesDstsConfiguration.java | 102 + ...egistrationPropertiesExtensionOptions.java | 2 +- ...ypeRegistrationPropertiesFeaturesRule.java | 2 +- ...istrationPropertiesIdentityManagement.java | 32 +- ...ypeRegistrationPropertiesLegacyPolicy.java | 137 + ...eTypeRegistrationPropertiesManagement.java | 291 ++ ...istrationPropertiesMarketplaceOptions.java | 98 + ...trationPropertiesRequestHeaderOptions.java | 15 +- ...peRegistrationPropertiesResourceCache.java | 128 + ...nPropertiesResourceGraphConfiguration.java | 94 + ...onPropertiesResourceManagementOptions.java | 176 ++ ...gementOptionsBatchProvisioningSupport.java | 101 + ...ementOptionsNestedProvisioningSupport.java | 101 + ...istrationPropertiesResourceMovePolicy.java | 2 +- ...tionPropertiesResourceQueryManagement.java | 98 + ...ResourceTypeCommonAttributeManagement.java | 100 + ...TypeRegistrationPropertiesRoutingRule.java | 95 + ...onLifecycleNotificationSpecifications.java | 2 +- ...onPropertiesTemplateDeploymentOptions.java | 2 +- ...ionPropertiesTemplateDeploymentPolicy.java | 127 + .../models/ResourceTypeRegistrations.java | 10 +- .../ResourceTypeRequestHeaderOptions.java | 15 +- .../providerhub/models/ResourceTypeSku.java | 16 +- .../ResourceTypeTemplateDeploymentPolicy.java | 17 +- .../models/ResourceValidation.java | 2 +- .../providerhub/models/Role.java | 53 + .../providerhub/models/RolloutStatusBase.java | 12 +- .../providerhub/models/RoutingType.java | 28 +- .../ServerFailureResponseMessageType.java | 51 + .../models/ServiceClientOptionsType.java | 52 + .../models/ServiceFeatureFlagAction.java | 51 + .../providerhub/models/ServiceStatus.java | 51 + .../providerhub/models/ServiceTreeInfo.java | 40 +- .../models/SignedRequestScope.java | 51 + .../providerhub/models/SkipNotifications.java | 56 + .../providerhub/models/SkuCapability.java | 12 +- .../providerhub/models/SkuCapacity.java | 24 +- .../providerhub/models/SkuCost.java | 18 +- .../providerhub/models/SkuLocationInfo.java | 30 +- .../providerhub/models/SkuResource.java | 8 + ...ResourceArrayResponseWithContinuation.java | 6 +- .../models/SkuResourceProperties.java | 24 +- .../providerhub/models/SkuScaleType.java | 2 +- .../providerhub/models/SkuSetting.java | 72 +- .../models/SkuSettingCapacity.java | 2 +- .../providerhub/models/SkuZoneDetail.java | 12 +- .../providerhub/models/SubscriberSetting.java | 98 + ...onLifecycleNotificationSpecifications.java | 12 +- .../SubscriptionNotificationOperation.java | 2 +- .../SubscriptionReregistrationResult.java | 2 +- .../providerhub/models/SubscriptionState.java | 2 +- .../SubscriptionStateOverrideAction.java | 12 +- .../models/SubscriptionStateRule.java | 12 +- .../SubscriptionTransitioningState.java | 2 +- .../models/SupportedOperations.java | 56 + .../models/SwaggerSpecification.java | 12 +- .../TemplateDeploymentCapabilities.java | 2 +- .../models/TemplateDeploymentOptions.java | 12 +- .../models/TemplateDeploymentPolicy.java | 43 +- ...plateDeploymentPreflightNotifications.java | 53 + .../TemplateDeploymentPreflightOptions.java | 2 +- .../models/ThirdPartyExtension.java | 93 + .../ThirdPartyProviderAuthorization.java | 12 +- .../providerhub/models/ThrottlingMetric.java | 18 +- .../models/ThrottlingMetricType.java | 2 +- .../providerhub/models/ThrottlingRule.java | 48 +- .../models/TokenAuthConfiguration.java | 158 ++ .../models/TrafficRegionCategory.java | 2 +- .../TrafficRegionRolloutConfiguration.java | 6 +- .../providerhub/models/TypedErrorInfo.java | 12 +- .../providerhub/models/package-info.java | 2 +- .../providerhub/package-info.java | 2 +- .../proxy-config.json | 2 +- .../reflect-config.json | 2 +- ...ure-resourcemanager-providerhub.properties | 1 + ...izedApplicationsCreateOrUpdateSamples.java | 40 + .../AuthorizedApplicationsDeleteSamples.java | 27 + .../AuthorizedApplicationsGetSamples.java | 27 + .../AuthorizedApplicationsListSamples.java | 23 + .../CustomRolloutsCreateOrUpdateSamples.java | 8 +- .../CustomRolloutsDeleteSamples.java | 25 + .../generated/CustomRolloutsGetSamples.java | 2 +- ...outsListByProviderRegistrationSamples.java | 2 +- .../generated/CustomRolloutsStopSamples.java | 24 + .../DefaultRolloutsCreateOrUpdateSamples.java | 4 +- .../DefaultRolloutsDeleteSamples.java | 2 +- .../generated/DefaultRolloutsGetSamples.java | 2 +- ...outsListByProviderRegistrationSamples.java | 2 +- .../generated/DefaultRolloutsStopSamples.java | 2 +- ...FrontloadReleaseCreateOrUpdateSamples.java | 67 + ...ontloadReleaseGenerateManifestSamples.java | 67 + .../NewRegionFrontloadReleaseGetSamples.java | 24 + .../NewRegionFrontloadReleaseStopSamples.java | 24 + ...ionRegistrationsCreateOrUpdateSamples.java | 2 +- ...otificationRegistrationsDeleteSamples.java | 2 +- .../NotificationRegistrationsGetSamples.java | 2 +- ...ionsListByProviderRegistrationSamples.java | 2 +- .../OperationsCreateOrUpdateSamples.java | 45 +- .../generated/OperationsDeleteSamples.java | 2 +- ...ionsListByProviderRegistrationSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- .../ProviderMonitorSettingsCreateSamples.java | 27 + .../ProviderMonitorSettingsDeleteSamples.java | 24 + ...itorSettingsGetByResourceGroupSamples.java | 24 + ...torSettingsListByResourceGroupSamples.java | 24 + .../ProviderMonitorSettingsListSamples.java | 24 + .../ProviderMonitorSettingsUpdateSamples.java | 24 + ...derRegistrationsCreateOrUpdateSamples.java | 123 +- .../ProviderRegistrationsDeleteSamples.java | 2 +- ...egistrationsGenerateOperationsSamples.java | 2 +- .../ProviderRegistrationsGetSamples.java | 2 +- .../ProviderRegistrationsListSamples.java | 2 +- ...ResourceActionsDeleteResourcesSamples.java | 35 + ...esourceProviderCheckinManifestSamples.java | 2 +- ...sourceProviderGenerateManifestSamples.java | 2 +- ...ypeRegistrationsCreateOrUpdateSamples.java | 204 +- ...esourceTypeRegistrationsDeleteSamples.java | 5 +- .../ResourceTypeRegistrationsGetSamples.java | 2 +- ...ionsListByProviderRegistrationSamples.java | 2 +- ...rUpdateNestedResourceTypeFirstSamples.java | 2 +- ...UpdateNestedResourceTypeSecondSamples.java | 2 +- ...rUpdateNestedResourceTypeThirdSamples.java | 2 +- .../generated/SkusCreateOrUpdateSamples.java | 2 +- ...sDeleteNestedResourceTypeFirstSamples.java | 2 +- ...DeleteNestedResourceTypeSecondSamples.java | 2 +- ...sDeleteNestedResourceTypeThirdSamples.java | 2 +- .../generated/SkusDeleteSamples.java | 2 +- ...SkusGetNestedResourceTypeFirstSamples.java | 2 +- ...kusGetNestedResourceTypeSecondSamples.java | 2 +- ...SkusGetNestedResourceTypeThirdSamples.java | 2 +- .../providerhub/generated/SkusGetSamples.java | 2 +- ...rationsNestedResourceTypeFirstSamples.java | 2 +- ...ationsNestedResourceTypeSecondSamples.java | 2 +- ...rationsNestedResourceTypeThirdSamples.java | 2 +- ...istByResourceTypeRegistrationsSamples.java | 2 +- .../AuthorizationActionMappingTests.java | 28 - ...rafficRegionRolloutConfigurationTests.java | 31 - ...ckNameAvailabilitySpecificationsTests.java | 31 - .../CheckinManifestInfoInnerTests.java | 35 - .../generated/CheckinManifestParamsTests.java | 29 - ...outArrayResponseWithContinuationTests.java | 76 - ...CustomRolloutSpecificationCanaryTests.java | 28 - ...outArrayResponseWithContinuationTests.java | 280 -- ...efaultRolloutSpecificationCanaryTests.java | 31 - ...tRolloutSpecificationHighTrafficTests.java | 32 - ...ltRolloutSpecificationLowTrafficTests.java | 32 - ...olloutSpecificationMediumTrafficTests.java | 33 - ...cificationRestOfTheWorldGroupOneTests.java | 33 - ...cificationRestOfTheWorldGroupTwoTests.java | 33 - ...eByResourceGroupWithResponseMockTests.java | 34 - ...aultRolloutsStopWithResponseMockTests.java | 33 - .../ExtendedLocationOptionsTests.java | 29 - .../generated/ExtensionOptionsTests.java | 33 - .../generated/FeaturesRuleTests.java | 25 - .../IdentityManagementPropertiesTests.java | 31 - .../generated/IdentityManagementTests.java | 25 - .../LightHouseAuthorizationTests.java | 29 - .../generated/LinkedAccessCheckTests.java | 38 - .../generated/LinkedOperationRuleTests.java | 32 - .../LoggingHiddenPropertyPathTests.java | 31 - .../LoggingRuleHiddenPropertyPathsTests.java | 31 - .../generated/LoggingRuleTests.java | 43 - .../generated/NotificationEndpointTests.java | 30 - ...ionArrayResponseWithContinuationTests.java | 91 - .../NotificationRegistrationInnerTests.java | 57 - ...istrationPropertiesAutoGeneratedTests.java | 52 - ...tificationRegistrationPropertiesTests.java | 54 - ...nsCreateOrUpdateWithResponseMockTests.java | 62 - ...eByResourceGroupWithResponseMockTests.java | 34 - ...RegistrationsGetWithResponseMockTests.java | 48 - ...nsListByProviderRegistrationMockTests.java | 51 - .../OperationsContentInnerTests.java | 51 - ...nsCreateOrUpdateWithResponseMockTests.java | 72 - ...ionArrayResponseWithContinuationTests.java | 76 - .../OperationsDefinitionDisplayTests.java | 35 - .../OperationsDefinitionInnerTests.java | 51 - ...OperationsDeleteWithResponseMockTests.java | 33 - .../OperationsDisplayDefinitionTests.java | 35 - ...iderRegistrationWithResponseMockTests.java | 49 - .../generated/OperationsListMockTests.java | 47 - .../generated/OperationsPutContentTests.java | 72 - ...ubMetadataProviderAuthenticationTests.java | 28 - ...ecycleNotificationSpecificationsTests.java | 45 - ...istrationsDeleteWithResponseMockTests.java | 33 - ...nerateOperationsWithResponseMockTests.java | 49 - .../ReRegisterSubscriptionMetadataTests.java | 29 - .../generated/RequestHeaderOptionsTests.java | 27 - .../generated/ResourceMovePolicyTests.java | 32 - .../ResourceProviderAuthenticationTests.java | 28 - .../ResourceProviderAuthorizationTests.java | 32 - .../ResourceProviderCapabilitiesTests.java | 34 - ...urceProviderEndpointFeaturesRuleTests.java | 27 - .../ResourceProviderEndpointTests.java | 48 - .../ResourceProviderManagementTests.java | 52 - ...urceProviderManifestFeaturesRuleTests.java | 27 - ...sourceProviderManifestManagementTests.java | 53 - ...erManifestPropertiesFeaturesRuleTests.java | 28 - ...iderManifestPropertiesManagementTests.java | 53 - ...PropertiesProviderAuthenticationTests.java | 29 - ...stPropertiesRequestHeaderOptionsTests.java | 29 - ...pertiesTemplateDeploymentOptionsTests.java | 34 - ...erManifestProviderAuthenticationTests.java | 28 - ...stReRegisterSubscriptionMetadataTests.java | 30 - ...iderManifestRequestHeaderOptionsTests.java | 28 - ...sCheckinManifestWithResponseMockTests.java | 46 - ...ResourceTypeEndpointFeaturesRuleTests.java | 27 - .../generated/ResourceTypeEndpointTests.java | 68 - ...sionOptionsResourceCreationBeginTests.java | 35 - .../ResourceTypeExtensionOptionsTests.java | 40 - .../generated/ResourceTypeExtensionTests.java | 36 - .../ResourceTypeFeaturesRuleTests.java | 26 - .../ResourceTypeIdentityManagementTests.java | 27 - ...ckNameAvailabilitySpecificationsTests.java | 33 - ...rationPropertiesExtensionOptionsTests.java | 42 - ...gistrationPropertiesFeaturesRuleTests.java | 28 - ...tionPropertiesIdentityManagementTests.java | 31 - ...onPropertiesRequestHeaderOptionsTests.java | 29 - ...tionPropertiesResourceMovePolicyTests.java | 33 - ...ecycleNotificationSpecificationsTests.java | 47 - ...pertiesTemplateDeploymentOptionsTests.java | 34 - ...eByResourceGroupWithResponseMockTests.java | 34 - ...ResourceTypeRequestHeaderOptionsTests.java | 27 - .../generated/ResourceTypeSkuTests.java | 179 -- ...urceTypeTemplateDeploymentPolicyTests.java | 32 - .../generated/ServiceTreeInfoTests.java | 27 - .../generated/SkuCapabilityTests.java | 27 - .../generated/SkuCapacityTests.java | 36 - .../providerhub/generated/SkuCostTests.java | 30 - .../generated/SkuLocationInfoTests.java | 58 - ...rceArrayResponseWithContinuationTests.java | 243 -- .../generated/SkuResourceInnerTests.java | 160 -- .../generated/SkuResourcePropertiesTests.java | 205 -- .../generated/SkuSettingCapacityTests.java | 37 - .../generated/SkuSettingTests.java | 118 - .../generated/SkuZoneDetailTests.java | 33 - ...esourceTypeFirstWithResponseMockTests.java | 150 -- ...sourceTypeSecondWithResponseMockTests.java | 89 - ...esourceTypeThirdWithResponseMockTests.java | 90 - ...usCreateOrUpdateWithResponseMockTests.java | 115 - ...esourceTypeFirstWithResponseMockTests.java | 35 - ...sourceTypeSecondWithResponseMockTests.java | 35 - ...esourceTypeThirdWithResponseMockTests.java | 35 - .../SkusDeleteWithResponseMockTests.java | 33 - ...esourceTypeFirstWithResponseMockTests.java | 60 - ...sourceTypeSecondWithResponseMockTests.java | 59 - ...esourceTypeThirdWithResponseMockTests.java | 59 - .../SkusGetWithResponseMockTests.java | 58 - ...tByResourceTypeRegistrationsMockTests.java | 68 - ...tionsNestedResourceTypeFirstMockTests.java | 70 - ...ionsNestedResourceTypeSecondMockTests.java | 70 - ...tionsNestedResourceTypeThirdMockTests.java | 71 - ...ecycleNotificationSpecificationsTests.java | 45 - .../SubscriptionStateOverrideActionTests.java | 32 - .../generated/SubscriptionStateRuleTests.java | 31 - .../generated/SwaggerSpecificationTests.java | 31 - .../TemplateDeploymentOptionsTests.java | 32 - .../TemplateDeploymentPolicyTests.java | 32 - .../generated/ThrottlingMetricTests.java | 34 - .../generated/ThrottlingRuleTests.java | 49 - ...rafficRegionRolloutConfigurationTests.java | 32 - .../generated/TrafficRegionsTests.java | 28 - .../generated/TypedErrorInfoTests.java | 25 - 559 files changed, 32992 insertions(+), 10960 deletions(-) create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/AuthorizedApplicationsClient.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NewRegionFrontloadReleasesClient.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderMonitorSettingsClient.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceActionsClient.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/AuthorizedApplicationInner.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsContentInner.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsPutContentInner.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderMonitorSettingInner.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsClientImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesClientImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesImpl.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsContentImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsPutContentImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsClientImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsClientImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsImpl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalAuthorization.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptions.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsAsyncOperation.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsResourceTypeRegistration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedResourceName.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedUnauthorizedActionsExtension.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApiProfile.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationDataAuthorization.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationProviderAuthorization.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncOperationPollingRules.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncTimeoutRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthenticationScheme.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplication.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationArrayResponseWithContinuation.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationProperties.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplications.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailabilityZonePolicy.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailableCheckInManifestEnvironment.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/BlockActionVerb.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CapacityPolicy.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CommonApiVersionsMergeMode.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CrossTenantTokenValidation.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesAutoGenerated.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationAutoProvisionConfig.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatusManifestCheckinStatus.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DataBoundary.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesAutoGenerated.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationAutoProvisionConfig.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationExpeditedRollout.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatusManifestCheckinStatus.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DeleteDependency.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DstsConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointInformation.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointTypeResourceType.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Error.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ErrorInnerError.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutDefinition.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutIntent.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRuleDstsConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterOption.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontdoorRequestMode.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayload.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadProperties.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideEndpointLevelFields.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideManifestLevelFields.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/InnerError.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Intent.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyDisallowedCondition.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyOperation.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedNotificationRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinition.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinitionDisplay.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinition.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionCs.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDe.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDefault.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEn.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEs.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionFr.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionHu.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionIt.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionJa.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionKo.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionNl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPl.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPt.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPtBR.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionRu.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionSv.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHans.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHant.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocationQuotaRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestLevelPropertyBag.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NewRegionFrontloadReleases.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Notification.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpointType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationOptions.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationPropertiesAutoGenerated.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiValidation.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContent.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContentProperties.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContentProperties.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptOutHeaderType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Policy.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PolicyExecutionType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PrivateResourceProviderConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSetting.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingArrayResponseWithContinuation.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingProperties.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettings.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationKind.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesAutoGenerated.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaPolicy.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Readiness.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessRole.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceActions.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceConcurrencyControlOption.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceGraphConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceHydrationAccount.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementAction.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementEntity.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationManagedByAuthorization.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationRules.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementErrorResponseMessageOptions.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementExpeditedRolloutMetadata.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesDstsConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesNotificationSettings.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResponseOptions.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderService.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceSubType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeCategory.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBase.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseDstsConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseFeaturesRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointDstsConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointKind.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtendedLocationPolicy.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeOnBehalfOfToken.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationKind.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAutoGenerated.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAvailabilityZoneRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCapacityRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesDstsConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesLegacyPolicy.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesManagement.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesMarketplaceOptions.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceCache.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceGraphConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptions.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceQueryManagement.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRoutingRule.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Role.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServerFailureResponseMessageType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceClientOptionsType.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceFeatureFlagAction.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceStatus.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SignedRequestScope.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkipNotifications.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriberSetting.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SupportedOperations.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightNotifications.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyExtension.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TokenAuthConfiguration.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/azure-resourcemanager-providerhub.properties create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsCreateOrUpdateSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsDeleteSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsGetSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsListSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsDeleteSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsStopSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseCreateOrUpdateSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGenerateManifestSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGetSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseStopSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsCreateSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsDeleteSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsGetByResourceGroupSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListByResourceGroupSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsUpdateSamples.java create mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceActionsDeleteResourcesSamples.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/AuthorizationActionMappingTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CanaryTrafficRegionRolloutConfigurationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckNameAvailabilitySpecificationsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestInfoInnerTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestParamsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutArrayResponseWithContinuationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutSpecificationCanaryTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutArrayResponseWithContinuationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationCanaryTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationHighTrafficTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationLowTrafficTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationMediumTrafficTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupOneTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupTwoTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtendedLocationOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtensionOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/FeaturesRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementPropertiesTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LightHouseAuthorizationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedAccessCheckTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedOperationRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingHiddenPropertyPathTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleHiddenPropertyPathsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationEndpointTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationArrayResponseWithContinuationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationInnerTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesAutoGeneratedTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsContentInnerTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionArrayResponseWithContinuationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionDisplayTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionInnerTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDisplayDefinitionTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsPutContentTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderHubMetadataProviderAuthenticationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ReRegisterSubscriptionMetadataTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/RequestHeaderOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceMovePolicyTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthenticationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthorizationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCapabilitiesTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointFeaturesRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManagementTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestFeaturesRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestManagementTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesFeaturesRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesManagementTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesProviderAuthenticationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesRequestHeaderOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesTemplateDeploymentOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestProviderAuthenticationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestReRegisterSubscriptionMetadataTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestRequestHeaderOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProvidersCheckinManifestWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointFeaturesRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsResourceCreationBeginTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeFeaturesRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeIdentityManagementTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecificationsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesExtensionOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesFeaturesRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesIdentityManagementTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesRequestHeaderOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesResourceMovePolicyTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesTemplateDeploymentOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRequestHeaderOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeSkuTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeTemplateDeploymentPolicyTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ServiceTreeInfoTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapabilityTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapacityTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCostTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuLocationInfoTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceArrayResponseWithContinuationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceInnerTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourcePropertiesTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingCapacityTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuZoneDetailTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetWithResponseMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdMockTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionLifecycleNotificationSpecificationsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateOverrideActionTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SwaggerSpecificationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentOptionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentPolicyTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingMetricTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingRuleTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionRolloutConfigurationTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionsTests.java delete mode 100644 sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TypedErrorInfoTests.java diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/CHANGELOG.md b/sdk/providerhub/azure-resourcemanager-providerhub/CHANGELOG.md index 7058d7ee08a7..57203452820b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/CHANGELOG.md +++ b/sdk/providerhub/azure-resourcemanager-providerhub/CHANGELOG.md @@ -1,14 +1,979 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-04-29) -### Features Added +- Azure Resource Manager ProviderHub client library for Java. This package contains Microsoft Azure SDK for ProviderHub Management SDK. Provider Hub. Package tag package-2024-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.CustomRolloutPropertiesAutoGenerated` was removed + +#### `models.InnerError` was removed + +#### `models.ErrorInnerError` was removed + +#### `models.Error` was removed + +#### `models.NotificationRegistrationPropertiesAutoGenerated` was removed + +#### `models.DefaultRolloutPropertiesAutoGenerated` was removed + +#### `models.ProviderRegistrationPropertiesAutoGenerated` was removed + +#### `models.OperationsContent` was removed + +#### `models.ResourceTypeRegistrationPropertiesAutoGenerated` was removed + +#### `models.SkuResourceProperties` was modified + +* `withProvisioningState(models.ProvisioningState)` was removed + +#### `models.ResourceTypeSku` was modified + +* `models.ResourceTypeSku withProvisioningState(models.ProvisioningState)` -> `models.ResourceTypeSku withProvisioningState(models.ProvisioningState)` + +#### `models.CustomRolloutProperties` was modified + +* `withProvisioningState(models.ProvisioningState)` was removed +* `withSpecification(models.CustomRolloutPropertiesSpecification)` was removed +* `withStatus(models.CustomRolloutPropertiesStatus)` was removed + +#### `models.ExtendedLocationOptions` was modified + +* `java.lang.String type()` -> `models.ExtendedLocationType type()` +* `withType(java.lang.String)` was removed +* `java.lang.String supportedPolicy()` -> `models.ResourceTypeExtendedLocationPolicy supportedPolicy()` +* `withSupportedPolicy(java.lang.String)` was removed + +#### `models.DefaultRolloutProperties` was modified + +* `withProvisioningState(models.ProvisioningState)` was removed +* `withSpecification(models.DefaultRolloutPropertiesSpecification)` was removed +* `withStatus(models.DefaultRolloutPropertiesStatus)` was removed + +#### `models.NotificationRegistrationProperties` was modified + +* `withMessageScope(models.MessageScope)` was removed +* `withIncludedEvents(java.util.List)` was removed +* `withNotificationMode(models.NotificationMode)` was removed +* `withNotificationEndpoints(java.util.List)` was removed +* `withProvisioningState(models.ProvisioningState)` was removed + +#### `models.ExtendedLocationType` was modified + +* `valueOf(java.lang.String)` was removed +* `models.ExtendedLocationType[] values()` -> `java.util.Collection values()` +* `toString()` was removed + +#### `models.ProviderRegistrationProperties` was modified + +* `withProviderAuthentication(models.ResourceProviderManifestPropertiesProviderAuthentication)` was removed +* `withManagement(models.ResourceProviderManifestPropertiesManagement)` was removed +* `withMetadata(java.lang.Object)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withProviderType(models.ResourceProviderType)` -> `models.ResourceProviderManifestProperties withProviderType(models.ResourceProviderType)` +* `withRequestHeaderOptions(models.ResourceProviderManifestPropertiesRequestHeaderOptions)` was removed +* `withFeaturesRule(models.ResourceProviderManifestPropertiesFeaturesRule)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withMetadata(java.lang.Object)` -> `models.ResourceProviderManifestProperties withMetadata(java.lang.Object)` +* `withTemplateDeploymentOptions(models.ResourceProviderManifestPropertiesTemplateDeploymentOptions)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withRequestHeaderOptions(models.ResourceProviderManifestPropertiesRequestHeaderOptions)` -> `models.ResourceProviderManifestProperties withRequestHeaderOptions(models.ResourceProviderManifestPropertiesRequestHeaderOptions)` +* `withProvisioningState(models.ProvisioningState)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withNamespace(java.lang.String)` -> `models.ResourceProviderManifestProperties withNamespace(java.lang.String)` +* `withProviderHubMetadata(models.ProviderRegistrationPropertiesProviderHubMetadata)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withCapabilities(java.util.List)` -> `models.ResourceProviderManifestProperties withCapabilities(java.util.List)` +* `withSubscriptionLifecycleNotificationSpecifications(models.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withFeaturesRule(models.ResourceProviderManifestPropertiesFeaturesRule)` -> `models.ResourceProviderManifestProperties withFeaturesRule(models.ResourceProviderManifestPropertiesFeaturesRule)` +* `withProviderAuthorizations(java.util.List)` was removed +* `withProviderType(models.ResourceProviderType)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withProviderVersion(java.lang.String)` -> `models.ResourceProviderManifestProperties withProviderVersion(java.lang.String)` +* `models.ProviderRegistrationPropertiesAutoGenerated withProviderAuthorizations(java.util.List)` -> `models.ResourceProviderManifestProperties withProviderAuthorizations(java.util.List)` +* `withNamespace(java.lang.String)` was removed +* `withProviderVersion(java.lang.String)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withProviderAuthentication(models.ResourceProviderManifestPropertiesProviderAuthentication)` -> `models.ResourceProviderManifestProperties withProviderAuthentication(models.ResourceProviderManifestPropertiesProviderAuthentication)` +* `withCapabilities(java.util.List)` was removed +* `withRequiredFeatures(java.util.List)` was removed +* `models.ProviderRegistrationPropertiesAutoGenerated withTemplateDeploymentOptions(models.ResourceProviderManifestPropertiesTemplateDeploymentOptions)` -> `models.ResourceProviderManifestProperties withTemplateDeploymentOptions(models.ResourceProviderManifestPropertiesTemplateDeploymentOptions)` +* `models.ProviderRegistrationPropertiesAutoGenerated withRequiredFeatures(java.util.List)` -> `models.ResourceProviderManifestProperties withRequiredFeatures(java.util.List)` +* `models.ProviderRegistrationPropertiesAutoGenerated withManagement(models.ResourceProviderManifestPropertiesManagement)` -> `models.ResourceProviderManifestProperties withManagement(models.ResourceProviderManifestPropertiesManagement)` + +#### `models.Operations` was modified + +* `createOrUpdateWithResponse(java.lang.String,models.OperationsPutContent,com.azure.core.util.Context)` was removed +* `createOrUpdate(java.lang.String,models.OperationsPutContent)` was removed + +#### `models.ResourceTypeRegistrations` was modified + +* `com.azure.core.http.rest.Response deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` -> `void deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` +* `deleteByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.OperationsPutContent` was modified + +* `fromJson(com.azure.json.JsonReader)` was removed +* `validate()` was removed +* `toJson(com.azure.json.JsonWriter)` was removed +* `withContents(java.util.List)` was removed +* `contents()` was removed + +#### `models.ResourceTypeRegistrationProperties` was modified + +* `withLinkedAccessChecks(java.util.List)` was removed +* `withEnableAsyncOperation(java.lang.Boolean)` was removed +* `withRegionality(models.Regionality)` was removed +* `withSubscriptionStateRules(java.util.List)` was removed +* `withTemplateDeploymentOptions(models.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions)` was removed +* `withSwaggerSpecifications(java.util.List)` was removed +* `withCheckNameAvailabilitySpecifications(models.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications)` was removed +* `withResourceDeletionPolicy(models.ResourceDeletionPolicy)` was removed +* `withProvisioningState(models.ProvisioningState)` was removed +* `withEndpoints(java.util.List)` was removed +* `withResourceMovePolicy(models.ResourceTypeRegistrationPropertiesResourceMovePolicy)` was removed +* `withIdentityManagement(models.ResourceTypeRegistrationPropertiesIdentityManagement)` was removed +* `withDefaultApiVersion(java.lang.String)` was removed +* `withAllowedUnauthorizedActions(java.util.List)` was removed +* `withLoggingRules(java.util.List)` was removed +* `withRequestHeaderOptions(models.ResourceTypeRegistrationPropertiesRequestHeaderOptions)` was removed +* `withRoutingType(models.RoutingType)` was removed +* `withEnableThirdPartyS2S(java.lang.Boolean)` was removed +* `withRequiredFeatures(java.util.List)` was removed +* `withFeaturesRule(models.ResourceTypeRegistrationPropertiesFeaturesRule)` was removed +* `withServiceTreeInfos(java.util.List)` was removed +* `withThrottlingRules(java.util.List)` was removed +* `withSubscriptionLifecycleNotificationSpecifications(models.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications)` was removed +* `withExtendedLocations(java.util.List)` was removed +* `withExtensionOptions(models.ResourceTypeRegistrationPropertiesExtensionOptions)` was removed +* `withAuthorizationActionMappings(java.util.List)` was removed +* `withMarketplaceType(models.MarketplaceType)` was removed +* `withDisallowedActionVerbs(java.util.List)` was removed +* `withIsPureProxy(java.lang.Boolean)` was removed + +### Features Added + +* `models.LocalizedOperationDisplayDefinitionRu` was added + +* `models.FanoutLinkedNotificationRuleDstsConfiguration` was added + +* `models.Notification` was added + +* `models.OpenApiConfiguration` was added + +* `models.ResourceTypeEndpointBaseDstsConfiguration` was added + +* `models.AuthenticationScheme` was added + +* `models.NotificationEndpointType` was added + +* `models.LocalizedOperationDefinition` was added + +* `models.LocalizedOperationDisplayDefinitionPt` was added + +* `models.ResourceTypeRegistrationPropertiesResourceQueryManagement` was added + +* `models.LocalizedOperationDisplayDefinitionPl` was added + +* `models.ResourceProviderManagementErrorResponseMessageOptions` was added + +* `models.ResourceProviderManifestPropertiesDstsConfiguration` was added + +* `models.ExpeditedRolloutIntent` was added + +* `models.ResourceTypeEndpointBaseFeaturesRule` was added + +* `models.ServerFailureResponseMessageType` was added + +* `models.ResourceTypeCategory` was added + +* `models.SupportedOperations` was added + +* `models.ThirdPartyExtension` was added + +* `models.ManifestLevelPropertyBag` was added + +* `models.ResourceGraphConfiguration` was added + +* `models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement` was added + +* `models.ApplicationProviderAuthorization` was added + +* `models.AuthorizedApplication$DefinitionStages` was added + +* `models.OptOutHeaderType` was added + +* `models.AuthorizedApplication$Definition` was added + +* `models.AdditionalOptionsResourceTypeRegistration` was added + +* `models.DataBoundary` was added + +* `models.AdditionalAuthorization` was added + +* `models.FilterOption` was added + +* `models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration` was added + +* `models.ResourceTypeRegistrationPropertiesResourceManagementOptions` was added + +* `models.CustomRolloutStatusManifestCheckinStatus` was added + +* `models.DeleteDependency` was added + +* `models.LocalizedOperationDefinitionDisplay` was added + +* `models.ResourceProviderManifestPropertiesResponseOptions` was added + +* `models.ProviderRegistrationKind` was added + +* `models.LegacyOperation` was added + +* `models.QuotaRule` was added + +* `models.EndpointInformation` was added + +* `models.ServiceFeatureFlagAction` was added + +* `models.AuthorizedApplicationProperties` was added + +* `models.LocalizedOperationDisplayDefinitionSv` was added + +* `models.LocalizedOperationDisplayDefinitionPtBR` was added + +* `models.SignedRequestScope` was added + +* `models.AuthorizedApplication` was added + +* `models.ResourceProviderManagementExpeditedRolloutMetadata` was added + +* `models.ServiceClientOptionsType` was added + +* `models.AuthorizedApplications` was added + +* `models.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport` was added + +* `models.ResourceProviderAuthorizationManagedByAuthorization` was added + +* `models.ProviderMonitorSettings` was added + +* `models.ResourceActions` was added + +* `models.AdditionalOptions` was added + +* `models.ResourceProviderManifestPropertiesNotificationSettings` was added + +* `models.OperationsContentProperties` was added + +* `models.Intent` was added + +* `models.DefaultRolloutStatusManifestCheckinStatus` was added + +* `models.LocalizedOperationDisplayDefinitionDefault` was added + +* `models.Role` was added + +* `models.PrivateResourceProviderConfiguration` was added + +* `models.AdditionalOptionsAsyncOperation` was added + +* `models.ResourceTypeOnBehalfOfToken` was added + +* `models.FrontloadPayloadProperties` was added + +* `models.AuthorizedApplicationArrayResponseWithContinuation` was added + +* `models.FrontdoorRequestMode` was added + +* `models.ResourceTypeRegistrationPropertiesRoutingRule` was added + +* `models.FrontloadPayload` was added + +* `models.BlockActionVerb` was added + +* `models.ApplicationDataAuthorization` was added + +* `models.SubscriberSetting` was added + +* `models.QuotaPolicy` was added + +* `models.CrossTenantTokenValidation` was added + +* `models.ResourceTypeEndpointKind` was added + +* `models.LegacyDisallowedCondition` was added + +* `models.ResourceTypeExtendedLocationPolicy` was added + +* `models.ServiceStatus` was added + +* `models.FilterRule` was added + +* `models.ExpeditedRolloutDefinition` was added + +* `models.AsyncTimeoutRule` was added + +* `models.DefaultRolloutSpecificationExpeditedRollout` was added + +* `models.AuthorizedApplication$UpdateStages` was added + +* `models.ResourceTypeRegistrationPropertiesMarketplaceOptions` was added + +* `models.NewRegionFrontloadReleases` was added + +* `models.EndpointTypeResourceType` was added + +* `models.ResourceTypeEndpointDstsConfiguration` was added + +* `models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule` was added + +* `models.ResourceTypeRegistrationPropertiesResourceCache` was added + +* `models.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration` was added + +* `models.Readiness` was added + +* `models.TemplateDeploymentPreflightNotifications` was added + +* `models.ResourceHydrationAccount` was added + +* `models.ResourceAccessRole` was added + +* `models.AsyncOperationPollingRules` was added + +* `models.FrontloadPayloadPropertiesOverrideEndpointLevelFields` was added + +* `models.DstsConfiguration` was added + +* `models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport` was added + +* `models.ResourceTypeEndpointBase` was added + +* `models.LocalizedOperationDisplayDefinition` was added + +* `models.ResourceManagementEntity` was added + +* `models.ResourceTypeRegistrationPropertiesCapacityRule` was added + +* `models.CustomRolloutSpecificationAutoProvisionConfig` was added + +* `models.AvailabilityZonePolicy` was added + +* `models.ResourceConcurrencyControlOption` was added + +* `models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove` was added + +* `models.OperationsPutContentProperties` was added + +* `models.NotificationType` was added + +* `models.ResourceTypeRegistrationPropertiesLegacyPolicy` was added + +* `models.LocalizedOperationDisplayDefinitionFr` was added + +* `models.AuthorizedApplication$Update` was added + +* `models.LinkedNotificationRule` was added + +* `models.LocalizedOperationDisplayDefinitionEs` was added + +* `models.ProviderMonitorSetting$DefinitionStages` was added + +* `models.LocalizedOperationDisplayDefinitionEn` was added + +* `models.LocalizedOperationDisplayDefinitionDe` was added + +* `models.DefaultRolloutSpecificationAutoProvisionConfig` was added + +* `models.ResourceTypeRegistrationKind` was added + +* `models.PolicyExecutionType` was added + +* `models.LocalizedOperationDisplayDefinitionCs` was added + +* `models.LocationQuotaRule` was added + +* `models.AvailableCheckInManifestEnvironment` was added + +* `models.LocalizedOperationDisplayDefinitionJa` was added + +* `models.FrontloadPayloadPropertiesOverrideManifestLevelFields` was added + +* `models.ProviderMonitorSettingProperties` was added + +* `models.NotificationOptions` was added + +* `models.TokenAuthConfiguration` was added + +* `models.CommonApiVersionsMergeMode` was added + +* `models.LocalizedOperationDisplayDefinitionIt` was added + +* `models.ResourceProviderService` was added + +* `models.ProviderMonitorSettingArrayResponseWithContinuation` was added + +* `models.FanoutLinkedNotificationRule` was added + +* `models.ResourceTypeRegistrationPropertiesManagement` was added + +* `models.LocalizedOperationDisplayDefinitionHu` was added + +* `models.LocalizedOperationDisplayDefinitionNl` was added + +* `models.ResourceManagementAction` was added + +* `models.AllowedUnauthorizedActionsExtension` was added + +* `models.EndpointType` was added + +* `models.Policy` was added + +* `models.ResourceTypeRegistrationPropertiesDstsConfiguration` was added + +* `models.ProviderMonitorSetting` was added + +* `models.ApiProfile` was added + +* `models.ResourceSubType` was added + +* `models.ProviderMonitorSetting$Definition` was added + +* `models.AllowedResourceName` was added + +* `models.ResourceProviderAuthorizationRules` was added + +* `models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy` was added + +* `models.LocalizedOperationDisplayDefinitionKo` was added + +* `models.SkipNotifications` was added + +* `models.CapacityPolicy` was added + +* `models.OpenApiValidation` was added + +* `models.LocalizedOperationDisplayDefinitionZhHans` was added + +* `models.LocalizedOperationDisplayDefinitionZhHant` was added + +#### `models.ResourceProviderManifestManagement` was modified + +* `withCanaryManifestOwners(java.util.List)` was added +* `withAuthorizationOwners(java.util.List)` was added +* `withErrorResponseMessageOptions(models.ResourceProviderManagementErrorResponseMessageOptions)` was added +* `withExpeditedRolloutMetadata(models.ResourceProviderManagementExpeditedRolloutMetadata)` was added +* `withExpeditedRolloutSubmitters(java.util.List)` was added +* `withProfitCenterProgramId(java.lang.String)` was added +* `withPcCode(java.lang.String)` was added + +#### `models.CustomRollouts` was modified + +* `deleteByResourceGroup(java.lang.String,java.lang.String)` was added +* `deleteByResourceGroupWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `stopWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `stop(java.lang.String,java.lang.String)` was added +* `deleteById(java.lang.String)` was added +* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added + +#### `models.DefaultRolloutStatus` was modified + +* `withManifestCheckinStatus(models.DefaultRolloutStatusManifestCheckinStatus)` was added +* `manifestCheckinStatus()` was added + +#### `models.ResourceProviderManagement` was modified + +* `withCanaryManifestOwners(java.util.List)` was added +* `withExpeditedRolloutSubmitters(java.util.List)` was added +* `withExpeditedRolloutMetadata(models.ResourceProviderManagementExpeditedRolloutMetadata)` was added +* `canaryManifestOwners()` was added +* `errorResponseMessageOptions()` was added +* `withPcCode(java.lang.String)` was added +* `withErrorResponseMessageOptions(models.ResourceProviderManagementErrorResponseMessageOptions)` was added +* `profitCenterProgramId()` was added +* `pcCode()` was added +* `expeditedRolloutMetadata()` was added +* `withAuthorizationOwners(java.util.List)` was added +* `withProfitCenterProgramId(java.lang.String)` was added +* `expeditedRolloutSubmitters()` was added +* `authorizationOwners()` was added + +#### `models.ResourceTypeRequestHeaderOptions` was modified + +* `withOptOutHeaders(models.OptOutHeaderType)` was added + +#### `models.NotificationRegistration` was modified + +* `systemData()` was added + +#### `models.ResourceTypeTemplateDeploymentPolicy` was modified + +* `withPreflightNotifications(models.TemplateDeploymentPreflightNotifications)` was added + +#### `models.ResourceProviderManifestPropertiesManagement` was modified + +* `withAuthorizationOwners(java.util.List)` was added +* `withProfitCenterProgramId(java.lang.String)` was added +* `withExpeditedRolloutSubmitters(java.util.List)` was added +* `withCanaryManifestOwners(java.util.List)` was added +* `withPcCode(java.lang.String)` was added +* `withExpeditedRolloutMetadata(models.ResourceProviderManagementExpeditedRolloutMetadata)` was added +* `withErrorResponseMessageOptions(models.ResourceProviderManagementErrorResponseMessageOptions)` was added + +#### `models.ResourceProviderManifestRequestHeaderOptions` was modified + +* `withOptOutHeaders(models.OptOutHeaderType)` was added + +#### `models.DefaultRolloutPropertiesSpecification` was modified + +* `withAutoProvisionConfig(models.DefaultRolloutSpecificationAutoProvisionConfig)` was added +* `withExpeditedRollout(models.DefaultRolloutSpecificationExpeditedRollout)` was added + +#### `models.CustomRolloutPropertiesStatus` was modified + +* `withManifestCheckinStatus(models.CustomRolloutStatusManifestCheckinStatus)` was added + +#### `models.SkuResourceProperties` was modified + +* `provisioningState()` was added + +#### `models.ResourceTypeRegistration$Update` was modified + +* `withKind(models.ResourceTypeRegistrationKind)` was added + +#### `models.ResourceProviderManifest` was modified + +* `serviceName()` was added +* `notifications()` was added +* `resourceProviderAuthorizationRules()` was added +* `services()` was added +* `crossTenantTokenValidation()` was added +* `enableTenantLinkedNotification()` was added +* `linkedNotificationRules()` was added + +#### `models.ServiceTreeInfo` was modified + +* `readiness()` was added +* `withReadiness(models.Readiness)` was added + +#### `models.ResourceProviderAuthorization` was modified + +* `groupingTag()` was added +* `managedByAuthorization()` was added +* `withGroupingTag(java.lang.String)` was added +* `allowedThirdPartyExtensions()` was added +* `withAllowedThirdPartyExtensions(java.util.List)` was added +* `withManagedByAuthorization(models.ResourceProviderAuthorizationManagedByAuthorization)` was added + +#### `models.ResourceProviderManifestPropertiesRequestHeaderOptions` was modified + +* `withOptOutHeaders(models.OptOutHeaderType)` was added + +#### `models.CustomRolloutStatus` was modified + +* `manifestCheckinStatus()` was added +* `withManifestCheckinStatus(models.CustomRolloutStatusManifestCheckinStatus)` was added + +#### `models.ResourceProviderManifestProperties` was modified + +* `withNotifications(java.util.List)` was added +* `managementGroupGlobalNotificationEndpoints()` was added +* `withCustomManifestVersion(java.lang.String)` was added +* `resourceProviderAuthorizationRules()` was added +* `withCrossTenantTokenValidation(models.CrossTenantTokenValidation)` was added +* `notificationOptions()` was added +* `withNotificationSettings(models.ResourceProviderManifestPropertiesNotificationSettings)` was added +* `linkedNotificationRules()` was added +* `withResourceGroupLockOptionDuringMove(models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove)` was added +* `legacyNamespace()` was added +* `withResponseOptions(models.ResourceProviderManifestPropertiesResponseOptions)` was added +* `withLegacyNamespace(java.lang.String)` was added +* `dstsConfiguration()` was added +* `responseOptions()` was added +* `withDstsConfiguration(models.ResourceProviderManifestPropertiesDstsConfiguration)` was added +* `notifications()` was added +* `withNotificationOptions(models.NotificationOptions)` was added +* `enableTenantLinkedNotification()` was added +* `withResourceProviderAuthorizationRules(models.ResourceProviderAuthorizationRules)` was added +* `globalNotificationEndpoints()` was added +* `optionalFeatures()` was added +* `resourceHydrationAccounts()` was added +* `customManifestVersion()` was added +* `notificationSettings()` was added +* `withGlobalNotificationEndpoints(java.util.List)` was added +* `withLinkedNotificationRules(java.util.List)` was added +* `withServices(java.util.List)` was added +* `crossTenantTokenValidation()` was added +* `withOptionalFeatures(java.util.List)` was added +* `serviceName()` was added +* `withManagementGroupGlobalNotificationEndpoints(java.util.List)` was added +* `legacyRegistrations()` was added +* `withResourceHydrationAccounts(java.util.List)` was added +* `withServiceName(java.lang.String)` was added +* `withLegacyRegistrations(java.util.List)` was added +* `withEnableTenantLinkedNotification(java.lang.Boolean)` was added +* `services()` was added +* `resourceGroupLockOptionDuringMove()` was added + +#### `models.CustomRolloutProperties` was modified + +* `provisioningState()` was added +* `specification()` was added +* `status()` was added + +#### `models.DefaultRolloutPropertiesStatus` was modified + +* `withManifestCheckinStatus(models.DefaultRolloutStatusManifestCheckinStatus)` was added + +#### `ProviderHubManager` was modified + +* `providerMonitorSettings()` was added +* `newRegionFrontloadReleases()` was added +* `resourceActions()` was added +* `authorizedApplications()` was added + +#### `models.ExtendedLocationOptions` was modified + +* `withSupportedPolicy(models.ResourceTypeExtendedLocationPolicy)` was added +* `withType(models.ExtendedLocationType)` was added + +#### `models.DefaultRolloutProperties` was modified + +* `status()` was added +* `specification()` was added +* `provisioningState()` was added + +#### `models.LinkedOperationRule` was modified + +* `dependsOnTypes()` was added +* `withDependsOnTypes(java.util.List)` was added + +#### `models.ResourceTypeRegistration$Definition` was modified + +* `withKind(models.ResourceTypeRegistrationKind)` was added + +#### `models.CustomRolloutSpecificationProviderRegistration` was modified + +* `withKind(models.ProviderRegistrationKind)` was added +* `systemData()` was added + +#### `models.ResourceTypeEndpoint` was modified + +* `withApiVersion(java.lang.String)` was added +* `endpointUri()` was added +* `withEndpointType(models.EndpointTypeResourceType)` was added +* `tokenAuthConfiguration()` was added +* `dstsConfiguration()` was added +* `withZones(java.util.List)` was added +* `withDataBoundary(models.DataBoundary)` was added +* `zones()` was added +* `dataBoundary()` was added +* `skuLink()` was added +* `endpointType()` was added +* `withEndpointUri(java.lang.String)` was added +* `withTokenAuthConfiguration(models.TokenAuthConfiguration)` was added +* `withSkuLink(java.lang.String)` was added +* `kind()` was added +* `withKind(models.ResourceTypeEndpointKind)` was added +* `withDstsConfiguration(models.ResourceTypeEndpointDstsConfiguration)` was added +* `apiVersion()` was added + +#### `models.ProviderRegistrationPropertiesProviderHubMetadata` was modified + +* `withGlobalAsyncOperationResourceTypeName(java.lang.String)` was added +* `withRegionalAsyncOperationResourceTypeName(java.lang.String)` was added +* `withDirectRpRoleDefinitionId(java.lang.String)` was added + +#### `models.NotificationRegistrationProperties` was modified + +* `notificationEndpoints()` was added +* `messageScope()` was added +* `includedEvents()` was added +* `provisioningState()` was added +* `notificationMode()` was added + +#### `models.CustomRollout` was modified + +* `systemData()` was added +* `stopWithResponse(com.azure.core.util.Context)` was added +* `stop()` was added + +#### `models.CustomRolloutPropertiesSpecification` was modified + +* `withRefreshSubscriptionRegistration(java.lang.Boolean)` was added +* `withReleaseScopes(java.util.List)` was added +* `withAutoProvisionConfig(models.CustomRolloutSpecificationAutoProvisionConfig)` was added +* `withSkipReleaseScopeValidation(java.lang.Boolean)` was added + +#### `models.ResourceType` was modified + +* `allowedUnauthorizedActionsExtensions()` was added +* `withLinkedNotificationRules(java.util.List)` was added +* `withResourceProviderAuthorizationRules(models.ResourceProviderAuthorizationRules)` was added +* `resourceProviderAuthorizationRules()` was added +* `crossTenantTokenValidation()` was added +* `linkedNotificationRules()` was added +* `notifications()` was added +* `withAdditionalOptions(models.AdditionalOptions)` was added +* `additionalOptions()` was added +* `withCrossTenantTokenValidation(models.CrossTenantTokenValidation)` was added +* `withQuotaRule(models.QuotaRule)` was added +* `quotaRule()` was added +* `withNotifications(java.util.List)` was added +* `withAllowedUnauthorizedActionsExtensions(java.util.List)` was added + +#### `models.CustomRolloutSpecification` was modified + +* `withAutoProvisionConfig(models.CustomRolloutSpecificationAutoProvisionConfig)` was added +* `skipReleaseScopeValidation()` was added +* `withRefreshSubscriptionRegistration(java.lang.Boolean)` was added +* `releaseScopes()` was added +* `withSkipReleaseScopeValidation(java.lang.Boolean)` was added +* `refreshSubscriptionRegistration()` was added +* `withReleaseScopes(java.util.List)` was added +* `autoProvisionConfig()` was added + +#### `models.ProviderRegistrationProperties` was modified + +* `withNotificationOptions(models.NotificationOptions)` was added +* `withEnableTenantLinkedNotification(java.lang.Boolean)` was added +* `withNotifications(java.util.List)` was added +* `privateResourceProviderConfiguration()` was added +* `withResourceGroupLockOptionDuringMove(models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove)` was added +* `withLegacyNamespace(java.lang.String)` was added +* `withServices(java.util.List)` was added +* `withManagementGroupGlobalNotificationEndpoints(java.util.List)` was added +* `withResourceHydrationAccounts(java.util.List)` was added +* `withGlobalNotificationEndpoints(java.util.List)` was added +* `withServiceName(java.lang.String)` was added +* `providerHubMetadata()` was added +* `withNotificationSettings(models.ResourceProviderManifestPropertiesNotificationSettings)` was added +* `withLegacyRegistrations(java.util.List)` was added +* `withCrossTenantTokenValidation(models.CrossTenantTokenValidation)` was added +* `withResourceProviderAuthorizationRules(models.ResourceProviderAuthorizationRules)` was added +* `subscriptionLifecycleNotificationSpecifications()` was added +* `withCustomManifestVersion(java.lang.String)` was added +* `withOptionalFeatures(java.util.List)` was added +* `withTokenAuthConfiguration(models.TokenAuthConfiguration)` was added +* `withDstsConfiguration(models.ResourceProviderManifestPropertiesDstsConfiguration)` was added +* `provisioningState()` was added +* `withPrivateResourceProviderConfiguration(models.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration)` was added +* `withResponseOptions(models.ResourceProviderManifestPropertiesResponseOptions)` was added +* `withLinkedNotificationRules(java.util.List)` was added +* `tokenAuthConfiguration()` was added + +#### `models.Operations` was modified + +* `createOrUpdateWithResponse(java.lang.String,fluent.models.OperationsPutContentInner,com.azure.core.util.Context)` was added +* `createOrUpdate(java.lang.String,fluent.models.OperationsPutContentInner)` was added + +#### `models.ResourceTypeRegistration` was modified + +* `systemData()` was added +* `kind()` was added + +#### `models.ProviderRegistration` was modified + +* `kind()` was added +* `systemData()` was added + +#### `models.ProviderHubMetadata` was modified + +* `directRpRoleDefinitionId()` was added +* `withRegionalAsyncOperationResourceTypeName(java.lang.String)` was added +* `withGlobalAsyncOperationResourceTypeName(java.lang.String)` was added +* `regionalAsyncOperationResourceTypeName()` was added +* `globalAsyncOperationResourceTypeName()` was added +* `withDirectRpRoleDefinitionId(java.lang.String)` was added + +#### `models.DefaultRolloutSpecificationProviderRegistration` was modified + +* `systemData()` was added +* `withKind(models.ProviderRegistrationKind)` was added + +#### `models.ResourceTypeRegistrations` was modified + +* `delete(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.OperationsPutContent` was modified + +* `id()` was added +* `properties()` was added +* `name()` was added +* `systemData()` was added +* `innerModel()` was added +* `type()` was added + +#### `models.SkuResource` was modified + +* `systemData()` was added + +#### `models.ResourceTypeRegistrationPropertiesIdentityManagement` was modified + +* `withApplicationIds(java.util.List)` was added +* `withDelegationAppIds(java.util.List)` was added + +#### `models.ResourceTypeRegistrationProperties` was modified + +* `defaultApiVersion()` was added +* `withCommonApiVersions(java.util.List)` was added +* `withSkuLink(java.lang.String)` was added +* `withResourceManagementOptions(models.ResourceTypeRegistrationPropertiesResourceManagementOptions)` was added +* `withResourceValidation(models.ResourceValidation)` was added +* `resourceTypeCommonAttributeManagement()` was added +* `withQuotaRule(models.QuotaRule)` was added +* `apiProfiles()` was added +* `withAllowedUnauthorizedActionsExtensions(java.util.List)` was added +* `linkedOperationRules()` was added +* `resourceMovePolicy()` was added +* `withCrossTenantTokenValidation(models.CrossTenantTokenValidation)` was added +* `availabilityZoneRule()` was added +* `enableThirdPartyS2S()` was added +* `addResourceListTargetLocations()` was added +* `checkNameAvailabilitySpecifications()` was added +* `withLegacyNames(java.util.List)` was added +* `subscriptionStateRules()` was added +* `supportsTags()` was added +* `withOnBehalfOfTokens(models.ResourceTypeOnBehalfOfToken)` was added +* `withFrontdoorRequestMode(models.FrontdoorRequestMode)` was added +* `withDisallowedEndUserOperations(java.util.List)` was added +* `category()` was added +* `withLinkedOperationRules(java.util.List)` was added +* `withAllowEmptyRoleAssignments(java.lang.Boolean)` was added +* `identityManagement()` was added +* `withManifestLink(java.lang.String)` was added +* `frontdoorRequestMode()` was added +* `openApiConfiguration()` was added +* `legacyNames()` was added +* `resourceCache()` was added +* `additionalOptions()` was added +* `disallowedEndUserOperations()` was added +* `groupingTag()` was added +* `allowEmptyRoleAssignments()` was added +* `skuLink()` was added +* `loggingRules()` was added +* `linkedAccessChecks()` was added +* `featuresRule()` was added +* `onBehalfOfTokens()` was added +* `withPolicyExecutionType(models.PolicyExecutionType)` was added +* `legacyPolicy()` was added +* `withAsyncTimeoutRules(java.util.List)` was added +* `management()` was added +* `regionality()` was added +* `withResourceTypeCommonAttributeManagement(models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement)` was added +* `routingType()` was added +* `withResourceConcurrencyControlOptions(java.util.Map)` was added +* `crossTenantTokenValidation()` was added +* `manifestLink()` was added +* `marketplaceOptions()` was added +* `withMarketplaceOptions(models.ResourceTypeRegistrationPropertiesMarketplaceOptions)` was added +* `allowedTemplateDeploymentReferenceActions()` was added +* `withCategory(models.ResourceTypeCategory)` was added +* `asyncOperationResourceTypeName()` was added +* `provisioningState()` was added +* `metadata()` was added +* `resourceValidation()` was added +* `resourceProviderAuthorizationRules()` was added +* `withAddResourceListTargetLocations(java.lang.Boolean)` was added +* `withLinkedNotificationRules(java.util.List)` was added +* `resourceConcurrencyControlOptions()` was added +* `tokenAuthConfiguration()` was added +* `requestHeaderOptions()` was added +* `withLegacyName(java.lang.String)` was added +* `resourceQueryManagement()` was added +* `notifications()` was added +* `withResourceGraphConfiguration(models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration)` was added +* `resourceGraphConfiguration()` was added +* `allowedResourceNames()` was added +* `isPureProxy()` was added +* `templateDeploymentPolicy()` was added +* `extendedLocations()` was added +* `subscriptionLifecycleNotificationSpecifications()` was added +* `withResourceSubType(models.ResourceSubType)` was added +* `authorizationActionMappings()` was added +* `withAsyncOperationResourceTypeName(java.lang.String)` was added +* `disallowedActionVerbs()` was added +* `policyExecutionType()` was added +* `withGroupingTag(java.lang.String)` was added +* `withSupportsTags(java.lang.Boolean)` was added +* `dstsConfiguration()` was added +* `withAvailabilityZoneRule(models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule)` was added +* `withDstsConfiguration(models.ResourceTypeRegistrationPropertiesDstsConfiguration)` was added +* `withCapacityRule(models.ResourceTypeRegistrationPropertiesCapacityRule)` was added +* `withNotifications(java.util.List)` was added +* `linkedNotificationRules()` was added +* `withAllowedTemplateDeploymentReferenceActions(java.util.List)` was added +* `swaggerSpecifications()` was added +* `marketplaceType()` was added +* `withTokenAuthConfiguration(models.TokenAuthConfiguration)` was added +* `templateDeploymentOptions()` was added +* `withResourceProviderAuthorizationRules(models.ResourceProviderAuthorizationRules)` was added +* `withResourceCache(models.ResourceTypeRegistrationPropertiesResourceCache)` was added +* `quotaRule()` was added +* `routingRule()` was added +* `allowedUnauthorizedActionsExtensions()` was added +* `requiredFeatures()` was added +* `withLegacyPolicy(models.ResourceTypeRegistrationPropertiesLegacyPolicy)` was added +* `withRoutingRule(models.ResourceTypeRegistrationPropertiesRoutingRule)` was added +* `allowedUnauthorizedActions()` was added +* `extensionOptions()` was added +* `withManagement(models.ResourceTypeRegistrationPropertiesManagement)` was added +* `asyncTimeoutRules()` was added +* `resourceDeletionPolicy()` was added +* `withAllowedResourceNames(java.util.List)` was added +* `withMetadata(java.util.Map)` was added +* `withOpenApiConfiguration(models.OpenApiConfiguration)` was added +* `legacyName()` was added +* `serviceTreeInfos()` was added +* `withAdditionalOptions(models.AdditionalOptionsResourceTypeRegistration)` was added +* `withResourceQueryManagement(models.ResourceTypeRegistrationPropertiesResourceQueryManagement)` was added +* `withApiProfiles(java.util.List)` was added +* `commonApiVersions()` was added +* `withTemplateDeploymentPolicy(models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy)` was added +* `resourceManagementOptions()` was added +* `resourceSubType()` was added +* `capacityRule()` was added +* `endpoints()` was added +* `throttlingRules()` was added +* `enableAsyncOperation()` was added + +#### `models.ThrottlingRule` was modified + +* `applicationId()` was added +* `withApplicationId(java.util.List)` was added + +#### `models.DefaultRolloutSpecification` was modified + +* `withExpeditedRollout(models.DefaultRolloutSpecificationExpeditedRollout)` was added +* `withAutoProvisionConfig(models.DefaultRolloutSpecificationAutoProvisionConfig)` was added +* `expeditedRollout()` was added +* `autoProvisionConfig()` was added + +#### `models.ResourceProviderEndpoint` was modified + +* `skuLink()` was added +* `withSkuLink(java.lang.String)` was added +* `withEndpointType(models.EndpointType)` was added +* `endpointType()` was added + +#### `models.RequestHeaderOptions` was modified + +* `optOutHeaders()` was added +* `withOptOutHeaders(models.OptOutHeaderType)` was added + +#### `models.TemplateDeploymentPolicy` was modified + +* `withPreflightNotifications(models.TemplateDeploymentPreflightNotifications)` was added +* `preflightNotifications()` was added + +#### `models.DefaultRollout` was modified + +* `systemData()` was added + +#### `models.IdentityManagementProperties` was modified + +* `delegationAppIds()` was added +* `withApplicationIds(java.util.List)` was added +* `withDelegationAppIds(java.util.List)` was added +* `applicationIds()` was added + +#### `models.ResourceTypeRegistrationPropertiesRequestHeaderOptions` was modified -### Other Changes +* `withOptOutHeaders(models.OptOutHeaderType)` was added ## 1.1.0 (2024-12-06) diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/README.md b/sdk/providerhub/azure-resourcemanager-providerhub/README.md index b83c27bfcf90..044b2b28b45b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/README.md +++ b/sdk/providerhub/azure-resourcemanager-providerhub/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ProviderHub client library for Java. -This package contains Microsoft Azure SDK for ProviderHub Management SDK. Microsoft ProviderHub. Package tag package-2020-11-20. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ProviderHub Management SDK. Provider Hub. Package tag package-2024-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ProviderHubManager manager = ProviderHubManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -110,5 +110,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/SAMPLE.md b/sdk/providerhub/azure-resourcemanager-providerhub/SAMPLE.md index e3ac0812fe8c..c19034511180 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/SAMPLE.md +++ b/sdk/providerhub/azure-resourcemanager-providerhub/SAMPLE.md @@ -1,11 +1,20 @@ # Code snippets and samples +## AuthorizedApplications + +- [CreateOrUpdate](#authorizedapplications_createorupdate) +- [Delete](#authorizedapplications_delete) +- [Get](#authorizedapplications_get) +- [List](#authorizedapplications_list) + ## CustomRollouts - [CreateOrUpdate](#customrollouts_createorupdate) +- [Delete](#customrollouts_delete) - [Get](#customrollouts_get) - [ListByProviderRegistration](#customrollouts_listbyproviderregistration) +- [Stop](#customrollouts_stop) ## DefaultRollouts @@ -15,6 +24,13 @@ - [ListByProviderRegistration](#defaultrollouts_listbyproviderregistration) - [Stop](#defaultrollouts_stop) +## NewRegionFrontloadRelease + +- [CreateOrUpdate](#newregionfrontloadrelease_createorupdate) +- [GenerateManifest](#newregionfrontloadrelease_generatemanifest) +- [Get](#newregionfrontloadrelease_get) +- [Stop](#newregionfrontloadrelease_stop) + ## NotificationRegistrations - [CreateOrUpdate](#notificationregistrations_createorupdate) @@ -29,6 +45,15 @@ - [List](#operations_list) - [ListByProviderRegistration](#operations_listbyproviderregistration) +## ProviderMonitorSettings + +- [Create](#providermonitorsettings_create) +- [Delete](#providermonitorsettings_delete) +- [GetByResourceGroup](#providermonitorsettings_getbyresourcegroup) +- [List](#providermonitorsettings_list) +- [ListByResourceGroup](#providermonitorsettings_listbyresourcegroup) +- [Update](#providermonitorsettings_update) + ## ProviderRegistrations - [CreateOrUpdate](#providerregistrations_createorupdate) @@ -37,6 +62,10 @@ - [Get](#providerregistrations_get) - [List](#providerregistrations_list) +## ResourceActions + +- [DeleteResources](#resourceactions_deleteresources) + ## ResourceProvider - [CheckinManifest](#resourceprovider_checkinmanifest) @@ -67,215 +96,346 @@ - [ListByResourceTypeRegistrationsNestedResourceTypeFirst](#skus_listbyresourcetyperegistrationsnestedresourcetypefirst) - [ListByResourceTypeRegistrationsNestedResourceTypeSecond](#skus_listbyresourcetyperegistrationsnestedresourcetypesecond) - [ListByResourceTypeRegistrationsNestedResourceTypeThird](#skus_listbyresourcetyperegistrationsnestedresourcetypethird) -### CustomRollouts_CreateOrUpdate +### AuthorizedApplications_CreateOrUpdate ```java -import com.azure.resourcemanager.providerhub.models.CustomRolloutProperties; -import com.azure.resourcemanager.providerhub.models.CustomRolloutPropertiesSpecification; -import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationCanary; +import com.azure.resourcemanager.providerhub.models.SkuCost; +import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; +import com.azure.resourcemanager.providerhub.models.SkuSetting; import java.util.Arrays; /** - * Samples for CustomRollouts CreateOrUpdate. + * Samples for Skus CreateOrUpdate. */ -public final class CustomRolloutsCreateOrUpdateSamples { +public final class SkusCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * CustomRollouts_CreateOrUpdate.json + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdate. + * json */ /** - * Sample code: CustomRollouts_CreateOrUpdate. + * Sample code: Skus_CreateOrUpdate. * * @param manager Entry point to ProviderHubManager. */ - public static void customRolloutsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.customRollouts() - .define("brazilUsShoeBoxTesting") - .withExistingProviderRegistration("Microsoft.Contoso") - .withProperties(new CustomRolloutProperties().withSpecification(new CustomRolloutPropertiesSpecification() - .withCanary(new CustomRolloutSpecificationCanary().withRegions(Arrays.asList("brazilus"))))) + public static void skusCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .define("testSku") + .withExistingResourcetypeRegistration("Microsoft.Contoso", "testResourceType") + .withProperties(new SkuResourceProperties().withSkuSettings( + Arrays.asList(new SkuSetting().withName("freeSku").withTier("Tier1").withKind("Standard"), + new SkuSetting().withName("premiumSku") + .withTier("Tier2") + .withKind("Premium") + .withCosts(Arrays.asList(new SkuCost().withMeterId("xxx")))))) .create(); } } ``` -### CustomRollouts_Get +### AuthorizedApplications_Delete ```java /** - * Samples for CustomRollouts Get. + * Samples for NotificationRegistrations ListByProviderRegistration. */ -public final class CustomRolloutsGetSamples { +public final class NotificationRegistrationsListByProviderRegistrationSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_Get. - * json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NotificationRegistrations_ListByProviderRegistration.json */ /** - * Sample code: CustomRollouts_Get. + * Sample code: NotificationRegistrations_ListByProviderRegistration. * * @param manager Entry point to ProviderHubManager. */ - public static void customRolloutsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.customRollouts() - .getWithResponse("Microsoft.Contoso", "canaryTesting99", com.azure.core.util.Context.NONE); + public static void notificationRegistrationsListByProviderRegistration( + com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.notificationRegistrations() + .listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` -### CustomRollouts_ListByProviderRegistration +### AuthorizedApplications_Get ```java /** - * Samples for CustomRollouts ListByProviderRegistration. + * Samples for Skus ListByResourceTypeRegistrationsNestedResourceTypeSecond. */ -public final class CustomRolloutsListByProviderRegistrationSamples { +public final class SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * CustomRollouts_ListByProviderRegistration.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond.json */ /** - * Sample code: CustomRollouts_ListByProviderRegistration. + * Sample code: Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond. * * @param manager Entry point to ProviderHubManager. */ - public static void - customRolloutsListByProviderRegistration(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.customRollouts().listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); + public static void skusListByResourceTypeRegistrationsNestedResourceTypeSecond( + com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .listByResourceTypeRegistrationsNestedResourceTypeSecond("Microsoft.Contoso", "testResourceType", + "nestedResourceTypeFirst", "nestedResourceTypeSecond", com.azure.core.util.Context.NONE); } } ``` -### DefaultRollouts_CreateOrUpdate +### AuthorizedApplications_List ```java -import com.azure.resourcemanager.providerhub.models.DefaultRolloutProperties; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutPropertiesSpecification; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationCanary; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo; -import java.time.Duration; -import java.util.Arrays; - /** - * Samples for DefaultRollouts CreateOrUpdate. + * Samples for DefaultRollouts Get. */ -public final class DefaultRolloutsCreateOrUpdateSamples { +public final class DefaultRolloutsGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * DefaultRollouts_CreateOrUpdate.json + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Get. + * json */ /** - * Sample code: DefaultRollouts_CreateOrUpdate. + * Sample code: DefaultRollouts_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void defaultRolloutsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.defaultRollouts() - .define("2020week10") - .withExistingProviderRegistration("Microsoft.Contoso") - .withProperties( - new DefaultRolloutProperties().withSpecification(new DefaultRolloutPropertiesSpecification() - .withCanary(new DefaultRolloutSpecificationCanary().withSkipRegions(Arrays.asList("eastus2euap"))) - .withRestOfTheWorldGroupTwo(new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() - .withWaitDuration(Duration.parse("PT4H"))))) - .create(); + public static void defaultRolloutsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.defaultRollouts().getWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); } } ``` -### DefaultRollouts_Delete +### CustomRollouts_CreateOrUpdate ```java /** - * Samples for DefaultRollouts Delete. + * Samples for ResourceTypeRegistrations Delete. */ -public final class DefaultRolloutsDeleteSamples { +public final class ResourceTypeRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * DefaultRollouts_Delete.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ResourceTypeRegistrations_Delete.json */ /** - * Sample code: DefaultRollouts_Delete. + * Sample code: ResourceTypeRegistrations_Delete. * * @param manager Entry point to ProviderHubManager. */ - public static void defaultRolloutsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.defaultRollouts() - .deleteByResourceGroupWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + public static void + resourceTypeRegistrationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceTypeRegistrations() + .delete("Microsoft.Contoso", "testResourceType", com.azure.core.util.Context.NONE); } } ``` -### DefaultRollouts_Get +### CustomRollouts_Delete ```java /** - * Samples for DefaultRollouts Get. + * Samples for Skus DeleteNestedResourceTypeThird. */ -public final class DefaultRolloutsGetSamples { +public final class SkusDeleteNestedResourceTypeThirdSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Get. - * json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_DeleteNestedResourceTypeThird.json */ /** - * Sample code: DefaultRollouts_Get. + * Sample code: Skus_DeleteNestedResourceTypeThird. * * @param manager Entry point to ProviderHubManager. */ - public static void defaultRolloutsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.defaultRollouts().getWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + public static void + skusDeleteNestedResourceTypeThird(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .deleteNestedResourceTypeThirdWithResponse("Microsoft.Contoso", "testResourceType", + "nestedResourceTypeFirst", "nestedResourceTypeSecond", "nestedResourceTypeThird", "testSku", + com.azure.core.util.Context.NONE); } } ``` -### DefaultRollouts_ListByProviderRegistration +### CustomRollouts_Get ```java +import com.azure.resourcemanager.providerhub.fluent.models.ProviderRegistrationInner; +import com.azure.resourcemanager.providerhub.models.BlockActionVerb; +import com.azure.resourcemanager.providerhub.models.CrossTenantTokenValidation; +import com.azure.resourcemanager.providerhub.models.EndpointInformation; +import com.azure.resourcemanager.providerhub.models.ExpeditedRolloutIntent; +import com.azure.resourcemanager.providerhub.models.FilterRule; +import com.azure.resourcemanager.providerhub.models.NotificationEndpointType; +import com.azure.resourcemanager.providerhub.models.NotificationOptions; +import com.azure.resourcemanager.providerhub.models.ProviderRegistrationKind; +import com.azure.resourcemanager.providerhub.models.ProviderRegistrationProperties; +import com.azure.resourcemanager.providerhub.models.Readiness; +import com.azure.resourcemanager.providerhub.models.ResourceHydrationAccount; +import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilities; +import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilitiesEffect; +import com.azure.resourcemanager.providerhub.models.ResourceProviderEndpoint; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesDstsConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesManagement; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesNotificationSettings; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesResponseOptions; +import com.azure.resourcemanager.providerhub.models.ResourceProviderService; +import com.azure.resourcemanager.providerhub.models.ResourceProviderType; +import com.azure.resourcemanager.providerhub.models.ServerFailureResponseMessageType; +import com.azure.resourcemanager.providerhub.models.ServiceClientOptionsType; +import com.azure.resourcemanager.providerhub.models.ServiceStatus; +import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; +import com.azure.resourcemanager.providerhub.models.SubscriberSetting; +import java.util.Arrays; + /** - * Samples for DefaultRollouts ListByProviderRegistration. + * Samples for ProviderRegistrations CreateOrUpdate. */ -public final class DefaultRolloutsListByProviderRegistrationSamples { +public final class ProviderRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * DefaultRollouts_ListByProviderRegistration.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * DirectProviderRegistrations_CreateOrUpdate.json */ /** - * Sample code: DefaultRollouts_ListByProviderRegistration. + * Sample code: DirectProviderRegistrations_CreateOrUpdate. * * @param manager Entry point to ProviderHubManager. */ public static void - defaultRolloutsListByProviderRegistration(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.defaultRollouts().listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); + directProviderRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerRegistrations() + .createOrUpdate("Microsoft.Contoso", + new ProviderRegistrationInner() + .withProperties(new ProviderRegistrationProperties() + .withServices(Arrays.asList( + new ResourceProviderService().withServiceName("tags").withStatus(ServiceStatus.INACTIVE))) + .withServiceName("root") + .withProviderVersion("2.0") + .withProviderType(ResourceProviderType.INTERNAL) + .withManagement(new ResourceProviderManifestPropertiesManagement() + .withIncidentRoutingService("Contoso Resource Provider") + .withIncidentRoutingTeam("Contoso Triage") + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos(Arrays + .asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT)))) + .withCapabilities(Arrays.asList( + new ResourceProviderCapabilities().withQuotaId("CSP_2015-05-01") + .withEffect(ResourceProviderCapabilitiesEffect.ALLOW), + new ResourceProviderCapabilities().withQuotaId("CSP_MG_2017-12-01") + .withEffect(ResourceProviderCapabilitiesEffect.ALLOW))) + .withDstsConfiguration( + new ResourceProviderManifestPropertiesDstsConfiguration().withServiceName("prds-shim") + .withServiceDnsName("prds.sparta.azure.com")) + .withNotificationOptions(NotificationOptions.EMIT_SPENDING_LIMIT) + .withResourceHydrationAccounts(Arrays + .asList(new ResourceHydrationAccount().withAccountName("classichydrationprodsn01") + .withSubscriptionId("e4eae963-2d15-43e6-a097-98bd75b33edd"), + new ResourceHydrationAccount() + .withAccountName("classichydrationprodch01") + .withSubscriptionId("69e69ecb-e69c-41d4-99b8-87dd12781067"))) + .withNotificationSettings(new ResourceProviderManifestPropertiesNotificationSettings() + .withSubscriberSettings(Arrays.asList( + new SubscriberSetting().withFilterRules(Arrays.asList(new FilterRule().withFilterQuery( + "Resources | where event.eventType in ('Microsoft.Network/IpAddresses/write', 'Microsoft.KeyVault/vaults/move/action')") + .withEndpointInformation(Arrays.asList( + new EndpointInformation().withEndpoint("https://userrp.azure.com/arnnotify") + .withEndpointType(NotificationEndpointType.WEBHOOK) + .withSchemaVersion("3.0"), + new EndpointInformation().withEndpoint("https://userrp.azure.com/arnnotify") + .withEndpointType(NotificationEndpointType.EVENTHUB) + .withSchemaVersion("3.0")))))))) + .withManagementGroupGlobalNotificationEndpoints(Arrays.asList(new ResourceProviderEndpoint() + .withEndpointUri("{your_management_group_notification_endpoint}"))) + .withOptionalFeatures(Arrays.asList("Microsoft.Resources/PlatformSubscription")) + .withResourceGroupLockOptionDuringMove( + new ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove() + .withBlockActionVerb(BlockActionVerb.ACTION)) + .withResponseOptions(new ResourceProviderManifestPropertiesResponseOptions() + .withServiceClientOptionsType(ServiceClientOptionsType.DISABLE_AUTOMATIC_DECOMPRESSION)) + .withLegacyNamespace("legacyNamespace") + .withLegacyRegistrations(Arrays.asList("legacyRegistration")) + .withCustomManifestVersion("2.0")) + .withKind(ProviderRegistrationKind.DIRECT), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderRegistrations_CreateOrUpdate.json + */ + /** + * Sample code: ProviderRegistrations_CreateOrUpdate. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + providerRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerRegistrations() + .createOrUpdate("Microsoft.Contoso", + new ProviderRegistrationInner().withProperties(new ProviderRegistrationProperties() + .withServices(Arrays.asList( + new ResourceProviderService().withServiceName("tags").withStatus(ServiceStatus.INACTIVE))) + .withServiceName("root") + .withProviderVersion("2.0") + .withProviderType(ResourceProviderType.INTERNAL) + .withManagement(new ResourceProviderManifestPropertiesManagement() + .withIncidentRoutingService("Contoso Resource Provider") + .withIncidentRoutingTeam("Contoso Triage") + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos( + Arrays.asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT))) + .withExpeditedRolloutSubmitters(Arrays.asList("SPARTA-PlatformServiceOperator")) + .withErrorResponseMessageOptions(new ResourceProviderManagementErrorResponseMessageOptions() + .withServerFailureResponseMessageType(ServerFailureResponseMessageType.OUTAGE_REPORTING)) + .withExpeditedRolloutMetadata( + new ResourceProviderManagementExpeditedRolloutMetadata().withEnabled(false) + .withExpeditedRolloutIntent(ExpeditedRolloutIntent.HOTFIX)) + .withCanaryManifestOwners(Arrays.asList("SPARTA-PlatformServiceAdmin")) + .withPcCode("fakeTokenPlaceholder") + .withProfitCenterProgramId("1234")) + .withCapabilities(Arrays.asList( + new ResourceProviderCapabilities().withQuotaId("CSP_2015-05-01") + .withEffect(ResourceProviderCapabilitiesEffect.ALLOW), + new ResourceProviderCapabilities().withQuotaId("CSP_MG_2017-12-01") + .withEffect(ResourceProviderCapabilitiesEffect.ALLOW))) + .withCrossTenantTokenValidation(CrossTenantTokenValidation.ENSURE_SECURE_VALIDATION)), + com.azure.core.util.Context.NONE); } } ``` -### DefaultRollouts_Stop +### CustomRollouts_ListByProviderRegistration ```java +import java.util.UUID; + /** - * Samples for DefaultRollouts Stop. + * Samples for AuthorizedApplications Get. */ -public final class DefaultRolloutsStopSamples { +public final class AuthorizedApplicationsGetSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Stop. - * json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_Get.json */ /** - * Sample code: DefaultRollouts_Stop. + * Sample code: AuthorizedApplications_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void defaultRolloutsStop(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.defaultRollouts().stopWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + public static void authorizedApplicationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications() + .getWithResponse("Microsoft.Contoso", UUID.fromString("760505bf-dcfa-4311-b890-18da392a00b2"), + com.azure.core.util.Context.NONE); } } ``` -### NotificationRegistrations_CreateOrUpdate +### CustomRollouts_Stop ```java import com.azure.resourcemanager.providerhub.models.MessageScope; @@ -289,7 +449,7 @@ import java.util.Arrays; */ public final class NotificationRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * NotificationRegistrations_CreateOrUpdate.json */ /** @@ -316,552 +476,1006 @@ public final class NotificationRegistrationsCreateOrUpdateSamples { } ``` -### NotificationRegistrations_Delete +### DefaultRollouts_CreateOrUpdate ```java /** - * Samples for NotificationRegistrations Delete. + * Samples for ProviderMonitorSettings ListByResourceGroup. */ -public final class NotificationRegistrationsDeleteSamples { +public final class ProviderMonitorSettingsListByResourceGroupSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * NotificationRegistrations_Delete.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_ListByResourceGroup.json */ /** - * Sample code: NotificationRegistrations_Delete. + * Sample code: ProviderMonitorSettings_ListByResourceGroup. * * @param manager Entry point to ProviderHubManager. */ public static void - notificationRegistrationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.notificationRegistrations() - .deleteByResourceGroupWithResponse("Microsoft.Contoso", "fooNotificationRegistration", - com.azure.core.util.Context.NONE); + providerMonitorSettingsListByResourceGroup(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings().listByResourceGroup("default", com.azure.core.util.Context.NONE); } } ``` -### NotificationRegistrations_Get +### DefaultRollouts_Delete ```java /** - * Samples for NotificationRegistrations Get. + * Samples for Skus Get. */ -public final class NotificationRegistrationsGetSamples { +public final class SkusGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * NotificationRegistrations_Get.json + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Get.json */ /** - * Sample code: NotificationRegistrations_Get. + * Sample code: Skus_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void notificationRegistrationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.notificationRegistrations() - .getWithResponse("Microsoft.Contoso", "fooNotificationRegistration", com.azure.core.util.Context.NONE); + public static void skusGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .getWithResponse("Microsoft.Contoso", "testResourceType", "testSku", com.azure.core.util.Context.NONE); } } ``` -### NotificationRegistrations_ListByProviderRegistration +### DefaultRollouts_Get ```java /** - * Samples for NotificationRegistrations ListByProviderRegistration. + * Samples for NewRegionFrontloadRelease Stop. */ -public final class NotificationRegistrationsListByProviderRegistrationSamples { +public final class NewRegionFrontloadReleaseStopSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * NotificationRegistrations_ListByProviderRegistration.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_Stop.json */ /** - * Sample code: NotificationRegistrations_ListByProviderRegistration. + * Sample code: NewRegionFrontloadRelease_Stop. * * @param manager Entry point to ProviderHubManager. */ - public static void notificationRegistrationsListByProviderRegistration( - com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.notificationRegistrations() - .listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); + public static void newRegionFrontloadReleaseStop(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .stopWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); } } ``` -### Operations_CreateOrUpdate +### DefaultRollouts_ListByProviderRegistration ```java -import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import com.azure.resourcemanager.providerhub.models.OperationsPutContent; -import java.util.Arrays; - /** - * Samples for Operations CreateOrUpdate. + * Samples for CustomRollouts ListByProviderRegistration. */ -public final class OperationsCreateOrUpdateSamples { +public final class CustomRolloutsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Operations_CreateOrUpdate.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * CustomRollouts_ListByProviderRegistration.json */ /** - * Sample code: Operations_CreateOrUpdate. + * Sample code: CustomRollouts_ListByProviderRegistration. * * @param manager Entry point to ProviderHubManager. */ - public static void operationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.operations() - .createOrUpdateWithResponse("Microsoft.Contoso", - new OperationsPutContent().withContents( - Arrays.asList(new OperationsDefinitionInner().withName("Microsoft.Contoso/Employees/Read") - .withDisplay(new OperationsDefinitionDisplay().withProvider("Microsoft.Contoso") - .withResource("Employees") - .withOperation("Gets/List employee resources") - .withDescription("Read employees")))), - com.azure.core.util.Context.NONE); + public static void + customRolloutsListByProviderRegistration(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.customRollouts().listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` -### Operations_Delete +### DefaultRollouts_Stop ```java /** - * Samples for Operations Delete. + * Samples for Skus Delete. */ -public final class OperationsDeleteSamples { +public final class SkusDeleteSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Operations_Delete. - * json + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Delete.json */ /** - * Sample code: Operations_Delete. + * Sample code: Skus_Delete. * * @param manager Entry point to ProviderHubManager. */ - public static void operationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.operations().deleteWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + public static void skusDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .deleteWithResponse("Microsoft.Contoso", "testResourceType", "testSku", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### NewRegionFrontloadRelease_CreateOrUpdate ```java +import com.azure.resourcemanager.providerhub.models.AvailableCheckInManifestEnvironment; +import com.azure.resourcemanager.providerhub.models.EndpointType; +import com.azure.resourcemanager.providerhub.models.FrontloadPayload; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadProperties; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideEndpointLevelFields; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideManifestLevelFields; +import com.azure.resourcemanager.providerhub.models.ResourceHydrationAccount; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseFeaturesRule; +import com.azure.resourcemanager.providerhub.models.ServiceFeatureFlagAction; +import java.time.Duration; +import java.util.Arrays; + /** - * Samples for Operations List. + * Samples for NewRegionFrontloadRelease CreateOrUpdate. */ -public final class OperationsListSamples { +public final class NewRegionFrontloadReleaseCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Operations_List.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_CreateOrUpdate.json */ /** - * Sample code: Operations_List. + * Sample code: NewRegionFrontloadRelease_CreateOrUpdate. * * @param manager Entry point to ProviderHubManager. */ - public static void operationsList(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void + newRegionFrontloadReleaseCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .createOrUpdateWithResponse("Microsoft.Contoso", "2020week10", + new FrontloadPayload().withProperties(new FrontloadPayloadProperties().withOperationType("Rollout") + .withProviderNamespace("Microsoft.Contoso") + .withFrontloadLocation("Israel Central") + .withCopyFromLocation("eastus") + .withEnvironmentType(AvailableCheckInManifestEnvironment.PROD) + .withServiceFeatureFlag(ServiceFeatureFlagAction.DO_NOT_CREATE) + .withIncludeResourceTypes(Arrays.asList("servers")) + .withExcludeResourceTypes(Arrays.asList("monitors")) + .withOverrideManifestLevelFields( + new FrontloadPayloadPropertiesOverrideManifestLevelFields().withResourceHydrationAccounts( + Arrays.asList(new ResourceHydrationAccount().withAccountName("classichydrationprodsn01") + .withSubscriptionId("e4eae963-2d15-43e6-a097-98bd75b33edd")))) + .withOverrideEndpointLevelFields( + new FrontloadPayloadPropertiesOverrideEndpointLevelFields().withEnabled(true) + .withApiVersions(Arrays.asList("2024-04-01-preview")) + .withEndpointUri("https://resource-endpoint.com/") + .withLocations(Arrays.asList("East US")) + .withRequiredFeatures(Arrays.asList("")) + .withFeaturesRule(new ResourceTypeEndpointBaseFeaturesRule()) + .withTimeout(Duration.parse("PT20S")) + .withEndpointType(EndpointType.PRODUCTION) + .withDstsConfiguration( + new ResourceTypeEndpointBaseDstsConfiguration().withServiceName("resourceprovider") + .withServiceDnsName("messaging.azure-ppe.net")) + .withSkuLink("http://endpointuri/westus/skus") + .withApiVersion("2024-04-01-preview") + .withZones(Arrays.asList("zone1"))) + .withIgnoreFields(Arrays.asList("apiversion"))), + com.azure.core.util.Context.NONE); } } ``` -### Operations_ListByProviderRegistration +### NewRegionFrontloadRelease_GenerateManifest ```java /** - * Samples for Operations ListByProviderRegistration. + * Samples for DefaultRollouts ListByProviderRegistration. */ -public final class OperationsListByProviderRegistrationSamples { +public final class DefaultRolloutsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Operations_ListByProviderRegistration.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * DefaultRollouts_ListByProviderRegistration.json */ /** - * Sample code: Operations_ListByProviderRegistration. + * Sample code: DefaultRollouts_ListByProviderRegistration. * * @param manager Entry point to ProviderHubManager. */ public static void - operationsListByProviderRegistration(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.operations() - .listByProviderRegistrationWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + defaultRolloutsListByProviderRegistration(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.defaultRollouts().listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` -### ProviderRegistrations_CreateOrUpdate +### NewRegionFrontloadRelease_Get ```java -import com.azure.resourcemanager.providerhub.fluent.models.ProviderRegistrationInner; -import com.azure.resourcemanager.providerhub.models.ProviderRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilities; -import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilitiesEffect; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesManagement; -import com.azure.resourcemanager.providerhub.models.ResourceProviderType; -import java.util.Arrays; - /** - * Samples for ProviderRegistrations CreateOrUpdate. + * Samples for AuthorizedApplications List. */ -public final class ProviderRegistrationsCreateOrUpdateSamples { +public final class AuthorizedApplicationsListSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ProviderRegistrations_CreateOrUpdate.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_List.json */ /** - * Sample code: ProviderRegistrations_CreateOrUpdate. + * Sample code: AuthorizedApplications_List. * * @param manager Entry point to ProviderHubManager. */ - public static void - providerRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.providerRegistrations() - .createOrUpdate("Microsoft.Contoso", - new ProviderRegistrationInner() - .withProperties(new ProviderRegistrationProperties().withProviderVersion("2.0") - .withProviderType(ResourceProviderType.INTERNAL) - .withManagement(new ResourceProviderManifestPropertiesManagement() - .withIncidentRoutingService("Contoso Resource Provider") - .withIncidentRoutingTeam("Contoso Triage") - .withIncidentContactEmail("helpme@contoso.com")) - .withCapabilities(Arrays.asList( - new ResourceProviderCapabilities().withQuotaId("CSP_2015-05-01") - .withEffect(ResourceProviderCapabilitiesEffect.ALLOW), - new ResourceProviderCapabilities().withQuotaId("CSP_MG_2017-12-01") - .withEffect(ResourceProviderCapabilitiesEffect.ALLOW)))), - com.azure.core.util.Context.NONE); + public static void authorizedApplicationsList(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications().list("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` -### ProviderRegistrations_Delete +### NewRegionFrontloadRelease_Stop ```java /** - * Samples for ProviderRegistrations Delete. + * Samples for Skus ListByResourceTypeRegistrationsNestedResourceTypeFirst. */ -public final class ProviderRegistrationsDeleteSamples { +public final class SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ProviderRegistrations_Delete.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst.json */ /** - * Sample code: ProviderRegistrations_Delete. + * Sample code: Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst. * * @param manager Entry point to ProviderHubManager. */ - public static void providerRegistrationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.providerRegistrations().deleteWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + public static void skusListByResourceTypeRegistrationsNestedResourceTypeFirst( + com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .listByResourceTypeRegistrationsNestedResourceTypeFirst("Microsoft.Contoso", "testResourceType", + "nestedResourceTypeFirst", com.azure.core.util.Context.NONE); } } ``` -### ProviderRegistrations_GenerateOperations +### NotificationRegistrations_CreateOrUpdate ```java +import com.azure.resourcemanager.providerhub.models.ApplicationDataAuthorization; +import com.azure.resourcemanager.providerhub.models.ApplicationProviderAuthorization; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplicationProperties; +import com.azure.resourcemanager.providerhub.models.Role; +import java.util.Arrays; +import java.util.UUID; + /** - * Samples for ProviderRegistrations GenerateOperations. + * Samples for AuthorizedApplications CreateOrUpdate. */ -public final class ProviderRegistrationsGenerateOperationsSamples { +public final class AuthorizedApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ProviderRegistrations_GenerateOperations.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_CreateOrUpdate.json */ /** - * Sample code: ProviderRegistrations_GenerateOperations. + * Sample code: AuthorizedApplications_CreateOrUpdate. * * @param manager Entry point to ProviderHubManager. */ public static void - providerRegistrationsGenerateOperations(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.providerRegistrations() - .generateOperationsWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + authorizedApplicationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications() + .define(UUID.fromString("760505bf-dcfa-4311-b890-18da392a00b2")) + .withExistingProviderRegistration("Microsoft.Contoso") + .withProperties(new AuthorizedApplicationProperties() + .withProviderAuthorization( + new ApplicationProviderAuthorization().withRoleDefinitionId("123456bf-gkur-2098-b890-98da392a00b2") + .withManagedByRoleDefinitionId("1a3b5c7d-8e9f-10g1-1h12-i13j14k1")) + .withDataAuthorizations(Arrays.asList(new ApplicationDataAuthorization().withRole(Role.SERVICE_OWNER) + .withResourceTypes(Arrays.asList("*"))))) + .create(); } } ``` -### ProviderRegistrations_Get +### NotificationRegistrations_Delete ```java /** - * Samples for ProviderRegistrations Get. + * Samples for NewRegionFrontloadRelease Get. */ -public final class ProviderRegistrationsGetSamples { +public final class NewRegionFrontloadReleaseGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ProviderRegistrations_Get.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_Get.json */ /** - * Sample code: ProviderRegistrations_Get. + * Sample code: NewRegionFrontloadRelease_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void providerRegistrationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.providerRegistrations().getWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + public static void newRegionFrontloadReleaseGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .getWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); } } ``` -### ProviderRegistrations_List +### NotificationRegistrations_Get ```java /** - * Samples for ProviderRegistrations List. + * Samples for Skus ListByResourceTypeRegistrations. */ -public final class ProviderRegistrationsListSamples { +public final class SkusListByResourceTypeRegistrationsSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ProviderRegistrations_List.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_ListByResourceTypeRegistrations.json */ /** - * Sample code: ProviderRegistrations_List. + * Sample code: Skus_ListByResourceTypeRegistrations. * * @param manager Entry point to ProviderHubManager. */ - public static void providerRegistrationsList(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.providerRegistrations().list(com.azure.core.util.Context.NONE); + public static void + skusListByResourceTypeRegistrations(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .listByResourceTypeRegistrations("Microsoft.Contoso", "testResourceType", com.azure.core.util.Context.NONE); } } ``` -### ResourceProvider_CheckinManifest +### NotificationRegistrations_ListByProviderRegistration ```java -import com.azure.resourcemanager.providerhub.models.CheckinManifestParams; - /** - * Samples for ResourceProvider CheckinManifest. + * Samples for Skus GetNestedResourceTypeFirst. */ -public final class ResourceProviderCheckinManifestSamples { +public final class SkusGetNestedResourceTypeFirstSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CheckinManifest.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_GetNestedResourceTypeFirst.json */ /** - * Sample code: CheckinManifest. + * Sample code: Skus_GetNestedResourceTypeFirst. * * @param manager Entry point to ProviderHubManager. */ - public static void checkinManifest(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.resourceProviders() - .checkinManifestWithResponse("Microsoft.Contoso", - new CheckinManifestParams().withEnvironment("Prod").withBaselineArmManifestLocation("EastUS2EUAP"), - com.azure.core.util.Context.NONE); + public static void + skusGetNestedResourceTypeFirst(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .getNestedResourceTypeFirstWithResponse("Microsoft.Contoso", "testResourceType", "nestedResourceTypeFirst", + "testSku", com.azure.core.util.Context.NONE); } } ``` -### ResourceProvider_GenerateManifest +### Operations_CreateOrUpdate ```java +import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.providerhub.models.SkuCost; +import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; +import com.azure.resourcemanager.providerhub.models.SkuSetting; +import java.util.Arrays; + /** - * Samples for ResourceProvider GenerateManifest. + * Samples for Skus CreateOrUpdateNestedResourceTypeThird. */ -public final class ResourceProviderGenerateManifestSamples { +public final class SkusCreateOrUpdateNestedResourceTypeThirdSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/GenerateManifest.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_CreateOrUpdateNestedResourceTypeThird.json */ /** - * Sample code: GenerateManifest. + * Sample code: Skus_CreateOrUpdateNestedResourceTypeThird. * * @param manager Entry point to ProviderHubManager. */ - public static void generateManifest(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.resourceProviders().generateManifestWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + public static void + skusCreateOrUpdateNestedResourceTypeThird(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .createOrUpdateNestedResourceTypeThirdWithResponse("Microsoft.Contoso", "testResourceType", + "nestedResourceTypeFirst", "nestedResourceTypeSecond", "nestedResourceTypeThird", "testSku", + new SkuResourceInner().withProperties(new SkuResourceProperties().withSkuSettings( + Arrays.asList(new SkuSetting().withName("freeSku").withTier("Tier1").withKind("Standard"), + new SkuSetting().withName("premiumSku") + .withTier("Tier2") + .withKind("Premium") + .withCosts(Arrays.asList(new SkuCost().withMeterId("xxx")))))), + com.azure.core.util.Context.NONE); } } ``` -### ResourceTypeRegistrations_CreateOrUpdate +### Operations_Delete ```java -import com.azure.resourcemanager.providerhub.models.Regionality; -import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpoint; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.RoutingType; -import com.azure.resourcemanager.providerhub.models.SwaggerSpecification; -import java.util.Arrays; - /** - * Samples for ResourceTypeRegistrations CreateOrUpdate. + * Samples for ProviderRegistrations Get. */ -public final class ResourceTypeRegistrationsCreateOrUpdateSamples { +public final class ProviderRegistrationsGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ResourceTypeRegistrations_CreateOrUpdate.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderRegistrations_Get.json */ /** - * Sample code: ResourceTypeRegistrations_CreateOrUpdate. + * Sample code: ProviderRegistrations_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void - resourceTypeRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.resourceTypeRegistrations() - .define("employees") - .withExistingProviderRegistration("Microsoft.Contoso") - .withProperties(new ResourceTypeRegistrationProperties().withRoutingType(RoutingType.DEFAULT) - .withRegionality(Regionality.REGIONAL) - .withEndpoints( - Arrays.asList(new ResourceTypeEndpoint().withApiVersions(Arrays.asList("2020-06-01-preview")) - .withLocations(Arrays.asList("West US", "East US", "North Europe")) - .withRequiredFeatures(Arrays.asList("")))) - .withSwaggerSpecifications(Arrays.asList(new SwaggerSpecification() - .withApiVersions(Arrays.asList("2020-06-01-preview")) - .withSwaggerSpecFolderUri( - "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/")))) - .create(); + public static void providerRegistrationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerRegistrations().getWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` -### ResourceTypeRegistrations_Delete +### Operations_List ```java /** - * Samples for ResourceTypeRegistrations Delete. + * Samples for CustomRollouts Stop. */ -public final class ResourceTypeRegistrationsDeleteSamples { +public final class CustomRolloutsStopSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ResourceTypeRegistrations_Delete.json + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Stop. + * json */ /** - * Sample code: ResourceTypeRegistrations_Delete. + * Sample code: CustomRollouts_Stop. * * @param manager Entry point to ProviderHubManager. */ - public static void - resourceTypeRegistrationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.resourceTypeRegistrations() - .deleteByResourceGroupWithResponse("Microsoft.Contoso", "testResourceType", - com.azure.core.util.Context.NONE); + public static void customRolloutsStop(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.customRollouts().stopWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); } } ``` -### ResourceTypeRegistrations_Get +### Operations_ListByProviderRegistration ```java /** - * Samples for ResourceTypeRegistrations Get. + * Samples for Operations List. */ -public final class ResourceTypeRegistrationsGetSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ResourceTypeRegistrations_Get.json + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Operations_List.json */ /** - * Sample code: ResourceTypeRegistrations_Get. + * Sample code: Operations_List. * * @param manager Entry point to ProviderHubManager. */ - public static void resourceTypeRegistrationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.resourceTypeRegistrations() - .getWithResponse("Microsoft.Contoso", "employees", com.azure.core.util.Context.NONE); + public static void operationsList(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### ResourceTypeRegistrations_ListByProviderRegistration +### ProviderMonitorSettings_Create ```java /** - * Samples for ResourceTypeRegistrations ListByProviderRegistration. + * Samples for Skus GetNestedResourceTypeSecond. */ -public final class ResourceTypeRegistrationsListByProviderRegistrationSamples { +public final class SkusGetNestedResourceTypeSecondSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ResourceTypeRegistrations_ListByProviderRegistration.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_GetNestedResourceTypeSecond.json */ /** - * Sample code: ResourceTypeRegistrations_ListByProviderRegistration. + * Sample code: Skus_GetNestedResourceTypeSecond. * * @param manager Entry point to ProviderHubManager. */ - public static void resourceTypeRegistrationsListByProviderRegistration( - com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.resourceTypeRegistrations() - .listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); + public static void + skusGetNestedResourceTypeSecond(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .getNestedResourceTypeSecondWithResponse("Microsoft.Contoso", "testResourceType", "nestedResourceTypeFirst", + "nestedResourceTypeSecond", "testSku", com.azure.core.util.Context.NONE); } } ``` -### Skus_CreateOrUpdate +### ProviderMonitorSettings_Delete ```java -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import java.util.Arrays; - /** - * Samples for Skus CreateOrUpdate. + * Samples for ProviderMonitorSettings GetByResourceGroup. */ -public final class SkusCreateOrUpdateSamples { +public final class ProviderMonitorSettingsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdate. - * json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Get.json */ /** - * Sample code: Skus_CreateOrUpdate. + * Sample code: ProviderMonitorSettings_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void skusCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .define("testSku") - .withExistingResourcetypeRegistration("Microsoft.Contoso", "testResourceType") - .withProperties(new SkuResourceProperties().withSkuSettings( - Arrays.asList(new SkuSetting().withName("freeSku").withTier("Tier1").withKind("Standard"), - new SkuSetting().withName("premiumSku") - .withTier("Tier2") - .withKind("Premium") - .withCosts(Arrays.asList(new SkuCost().withMeterId("xxx")))))) + public static void providerMonitorSettingsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .getByResourceGroupWithResponse("default", "ContosoMonitorSetting", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderMonitorSettings_GetByResourceGroup + +```java +/** + * Samples for ProviderMonitorSettings Update. + */ +public final class ProviderMonitorSettingsUpdateSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Update.json + */ + /** + * Sample code: ProviderMonitorSettings_Update. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerMonitorSettingsUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .updateWithResponse("default", "ContosoMonitorSetting", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderMonitorSettings_List + +```java +/** + * Samples for DefaultRollouts Delete. + */ +public final class DefaultRolloutsDeleteSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * DefaultRollouts_Delete.json + */ + /** + * Sample code: DefaultRollouts_Delete. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void defaultRolloutsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.defaultRollouts() + .deleteByResourceGroupWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderMonitorSettings_ListByResourceGroup + +```java +import com.azure.resourcemanager.providerhub.models.CheckinManifestParams; + +/** + * Samples for ResourceProvider CheckinManifest. + */ +public final class ResourceProviderCheckinManifestSamples { + /* + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CheckinManifest.json + */ + /** + * Sample code: CheckinManifest. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void checkinManifest(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceProviders() + .checkinManifestWithResponse("Microsoft.Contoso", + new CheckinManifestParams().withEnvironment("Prod").withBaselineArmManifestLocation("EastUS2EUAP"), + com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderMonitorSettings_Update + +```java +/** + * Samples for Skus DeleteNestedResourceTypeFirst. + */ +public final class SkusDeleteNestedResourceTypeFirstSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_DeleteNestedResourceTypeFirst.json + */ + /** + * Sample code: Skus_DeleteNestedResourceTypeFirst. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + skusDeleteNestedResourceTypeFirst(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .deleteNestedResourceTypeFirstWithResponse("Microsoft.Contoso", "testResourceType", + "nestedResourceTypeFirst", "testSku", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderRegistrations_CreateOrUpdate + +```java +/** + * Samples for ResourceTypeRegistrations Get. + */ +public final class ResourceTypeRegistrationsGetSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ResourceTypeRegistrations_Get.json + */ + /** + * Sample code: ResourceTypeRegistrations_Get. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void resourceTypeRegistrationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceTypeRegistrations() + .getWithResponse("Microsoft.Contoso", "employees", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderRegistrations_Delete + +```java +/** + * Samples for Skus DeleteNestedResourceTypeSecond. + */ +public final class SkusDeleteNestedResourceTypeSecondSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_DeleteNestedResourceTypeSecond.json + */ + /** + * Sample code: Skus_DeleteNestedResourceTypeSecond. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + skusDeleteNestedResourceTypeSecond(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .deleteNestedResourceTypeSecondWithResponse("Microsoft.Contoso", "testResourceType", + "nestedResourceTypeFirst", "nestedResourceTypeSecond", "testSku", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderRegistrations_GenerateOperations + +```java +/** + * Samples for ProviderRegistrations GenerateOperations. + */ +public final class ProviderRegistrationsGenerateOperationsSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderRegistrations_GenerateOperations.json + */ + /** + * Sample code: ProviderRegistrations_GenerateOperations. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + providerRegistrationsGenerateOperations(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerRegistrations() + .generateOperationsWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderRegistrations_Get + +```java +/** + * Samples for ResourceProvider GenerateManifest. + */ +public final class ResourceProviderGenerateManifestSamples { + /* + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/GenerateManifest.json + */ + /** + * Sample code: GenerateManifest. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void generateManifest(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceProviders().generateManifestWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + } +} +``` + +### ProviderRegistrations_List + +```java +/** + * Samples for Skus GetNestedResourceTypeThird. + */ +public final class SkusGetNestedResourceTypeThirdSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_GetNestedResourceTypeThird.json + */ + /** + * Sample code: Skus_GetNestedResourceTypeThird. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + skusGetNestedResourceTypeThird(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .getNestedResourceTypeThirdWithResponse("Microsoft.Contoso", "testResourceType", "nestedResourceTypeFirst", + "nestedResourceTypeSecond", "nestedResourceTypeThird", "testSku", com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceActions_DeleteResources + +```java +/** + * Samples for NotificationRegistrations Delete. + */ +public final class NotificationRegistrationsDeleteSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NotificationRegistrations_Delete.json + */ + /** + * Sample code: NotificationRegistrations_Delete. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + notificationRegistrationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.notificationRegistrations() + .deleteByResourceGroupWithResponse("Microsoft.Contoso", "fooNotificationRegistration", + com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceProvider_CheckinManifest + +```java +/** + * Samples for ProviderRegistrations List. + */ +public final class ProviderRegistrationsListSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderRegistrations_List.json + */ + /** + * Sample code: ProviderRegistrations_List. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerRegistrationsList(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerRegistrations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceProvider_GenerateManifest + +```java +import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.providerhub.models.SkuCost; +import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; +import com.azure.resourcemanager.providerhub.models.SkuSetting; +import java.util.Arrays; + +/** + * Samples for Skus CreateOrUpdateNestedResourceTypeFirst. + */ +public final class SkusCreateOrUpdateNestedResourceTypeFirstSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Skus_CreateOrUpdateNestedResourceTypeFirst.json + */ + /** + * Sample code: Skus_CreateOrUpdateNestedResourceTypeFirst. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + skusCreateOrUpdateNestedResourceTypeFirst(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.skus() + .createOrUpdateNestedResourceTypeFirstWithResponse("Microsoft.Contoso", "testResourceType", + "nestedResourceTypeFirst", "testSku", + new SkuResourceInner().withProperties(new SkuResourceProperties().withSkuSettings( + Arrays.asList(new SkuSetting().withName("freeSku").withTier("Tier1").withKind("Standard"), + new SkuSetting().withName("premiumSku") + .withTier("Tier2") + .withKind("Premium") + .withCosts(Arrays.asList(new SkuCost().withMeterId("xxx")))))), + com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceTypeRegistrations_CreateOrUpdate + +```java +import com.azure.resourcemanager.providerhub.models.CustomRolloutProperties; +import com.azure.resourcemanager.providerhub.models.CustomRolloutPropertiesSpecification; +import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationAutoProvisionConfig; +import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationCanary; +import java.util.Arrays; + +/** + * Samples for CustomRollouts CreateOrUpdate. + */ +public final class CustomRolloutsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * CustomRollouts_CreateOrUpdate.json + */ + /** + * Sample code: CustomRollouts_CreateOrUpdate. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void customRolloutsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.customRollouts() + .define("brazilUsShoeBoxTesting") + .withExistingProviderRegistration("Microsoft.Contoso") + .withProperties(new CustomRolloutProperties().withSpecification(new CustomRolloutPropertiesSpecification() + .withAutoProvisionConfig( + new CustomRolloutSpecificationAutoProvisionConfig().withStorage(true).withResourceGraph(true)) + .withCanary(new CustomRolloutSpecificationCanary().withRegions(Arrays.asList("brazilus"))) + .withRefreshSubscriptionRegistration(true))) .create(); } } ``` +### ResourceTypeRegistrations_Delete + +```java +/** + * Samples for DefaultRollouts Stop. + */ +public final class DefaultRolloutsStopSamples { + /* + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Stop. + * json + */ + /** + * Sample code: DefaultRollouts_Stop. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void defaultRolloutsStop(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.defaultRollouts().stopWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceTypeRegistrations_Get + +```java +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDefinition; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDefinitionDisplay; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDisplayDefinitionDefault; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDisplayDefinitionEn; +import com.azure.resourcemanager.providerhub.models.OperationActionType; +import com.azure.resourcemanager.providerhub.models.OperationOrigins; +import com.azure.resourcemanager.providerhub.models.OperationsPutContentProperties; +import java.util.Arrays; + +/** + * Samples for Operations CreateOrUpdate. + */ +public final class OperationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Operations_CreateOrUpdate.json + */ + /** + * Sample code: Operations_CreateOrUpdate. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void operationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.operations() + .createOrUpdateWithResponse("Microsoft.Contoso", new OperationsPutContentInner().withProperties( + new OperationsPutContentProperties().withContents(Arrays.asList(new LocalizedOperationDefinition() + .withName("RP.69C09791/register/action") + .withIsDataAction(true) + .withDisplay(new LocalizedOperationDefinitionDisplay().withDefaultProperty( + new LocalizedOperationDisplayDefinitionDefault().withProvider("RP.69C09791") + .withResource("Register") + .withOperation("Registers the RP.69C09791 Resource Provider") + .withDescription( + "Registers the subscription for the RP.69C09791 resource provider and enables the creation of RP.69C09791."))) + .withActionType(OperationActionType.INTERNAL), + new LocalizedOperationDefinition().withName("RP.69C09791/unregister/action") + .withIsDataAction(false) + .withOrigin(OperationOrigins.SYSTEM) + .withDisplay(new LocalizedOperationDefinitionDisplay() + .withDefaultProperty(new LocalizedOperationDisplayDefinitionDefault() + .withProvider("RP.69C09791") + .withResource("Unregister") + .withOperation("Unregisters the RP.69C09791 Resource Provider") + .withDescription( + "Unregisters the subscription for the RP.69C09791 resource provider and enables the creation of RP.69C09791.")) + .withEn(new LocalizedOperationDisplayDefinitionEn().withProvider("RP.69C09791") + .withResource("2e1803d4-417f-492c-b305-148da38b211e") + .withOperation("d31623d6-8765-42fb-aca2-5a58303e52dd") + .withDescription("ece249f5-b5b9-492d-ac68-b4e1be1677bc")))))), + com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceTypeRegistrations_ListByProviderRegistration + +```java +/** + * Samples for ProviderRegistrations Delete. + */ +public final class ProviderRegistrationsDeleteSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderRegistrations_Delete.json + */ + /** + * Sample code: ProviderRegistrations_Delete. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerRegistrationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerRegistrations().deleteWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); + } +} +``` + +### Skus_CreateOrUpdate + +```java +/** + * Samples for CustomRollouts Delete. + */ +public final class CustomRolloutsDeleteSamples { + /* + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Delete + * .json + */ + /** + * Sample code: providerReleases_Delete. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerReleasesDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.customRollouts() + .deleteByResourceGroupWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + } +} +``` + ### Skus_CreateOrUpdateNestedResourceTypeFirst ```java -import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import java.util.Arrays; - /** - * Samples for Skus CreateOrUpdateNestedResourceTypeFirst. + * Samples for ResourceTypeRegistrations ListByProviderRegistration. */ -public final class SkusCreateOrUpdateNestedResourceTypeFirstSamples { +public final class ResourceTypeRegistrationsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_CreateOrUpdateNestedResourceTypeFirst.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ResourceTypeRegistrations_ListByProviderRegistration.json */ /** - * Sample code: Skus_CreateOrUpdateNestedResourceTypeFirst. + * Sample code: ResourceTypeRegistrations_ListByProviderRegistration. * * @param manager Entry point to ProviderHubManager. */ - public static void - skusCreateOrUpdateNestedResourceTypeFirst(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .createOrUpdateNestedResourceTypeFirstWithResponse("Microsoft.Contoso", "testResourceType", - "nestedResourceTypeFirst", "testSku", - new SkuResourceInner().withProperties(new SkuResourceProperties().withSkuSettings( - Arrays.asList(new SkuSetting().withName("freeSku").withTier("Tier1").withKind("Standard"), - new SkuSetting().withName("premiumSku") - .withTier("Tier2") - .withKind("Premium") - .withCosts(Arrays.asList(new SkuCost().withMeterId("xxx")))))), - com.azure.core.util.Context.NONE); + public static void resourceTypeRegistrationsListByProviderRegistration( + com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceTypeRegistrations() + .listByProviderRegistration("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` @@ -880,7 +1494,7 @@ import java.util.Arrays; */ public final class SkusCreateOrUpdateNestedResourceTypeSecondSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_CreateOrUpdateNestedResourceTypeSecond.json */ /** @@ -907,36 +1521,64 @@ public final class SkusCreateOrUpdateNestedResourceTypeSecondSamples { ### Skus_CreateOrUpdateNestedResourceTypeThird ```java -import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuSetting; +import com.azure.resourcemanager.providerhub.models.AvailableCheckInManifestEnvironment; +import com.azure.resourcemanager.providerhub.models.EndpointType; +import com.azure.resourcemanager.providerhub.models.FrontloadPayload; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadProperties; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideEndpointLevelFields; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideManifestLevelFields; +import com.azure.resourcemanager.providerhub.models.ResourceHydrationAccount; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseFeaturesRule; +import com.azure.resourcemanager.providerhub.models.ServiceFeatureFlagAction; +import java.time.Duration; import java.util.Arrays; /** - * Samples for Skus CreateOrUpdateNestedResourceTypeThird. + * Samples for NewRegionFrontloadRelease GenerateManifest. */ -public final class SkusCreateOrUpdateNestedResourceTypeThirdSamples { +public final class NewRegionFrontloadReleaseGenerateManifestSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_CreateOrUpdateNestedResourceTypeThird.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_GenerateManifest.json */ /** - * Sample code: Skus_CreateOrUpdateNestedResourceTypeThird. + * Sample code: NewRegionFrontloadRelease_GenerateManifest. * * @param manager Entry point to ProviderHubManager. */ public static void - skusCreateOrUpdateNestedResourceTypeThird(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .createOrUpdateNestedResourceTypeThirdWithResponse("Microsoft.Contoso", "testResourceType", - "nestedResourceTypeFirst", "nestedResourceTypeSecond", "nestedResourceTypeThird", "testSku", - new SkuResourceInner().withProperties(new SkuResourceProperties().withSkuSettings( - Arrays.asList(new SkuSetting().withName("freeSku").withTier("Tier1").withKind("Standard"), - new SkuSetting().withName("premiumSku") - .withTier("Tier2") - .withKind("Premium") - .withCosts(Arrays.asList(new SkuCost().withMeterId("xxx")))))), + newRegionFrontloadReleaseGenerateManifest(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .generateManifestWithResponse("Microsoft.Contoso", + new FrontloadPayload().withProperties(new FrontloadPayloadProperties().withOperationType("Rollout") + .withProviderNamespace("Microsoft.Contoso") + .withFrontloadLocation("Israel Central") + .withCopyFromLocation("eastus") + .withEnvironmentType(AvailableCheckInManifestEnvironment.PROD) + .withServiceFeatureFlag(ServiceFeatureFlagAction.DO_NOT_CREATE) + .withIncludeResourceTypes(Arrays.asList("servers")) + .withExcludeResourceTypes(Arrays.asList("monitors")) + .withOverrideManifestLevelFields( + new FrontloadPayloadPropertiesOverrideManifestLevelFields().withResourceHydrationAccounts( + Arrays.asList(new ResourceHydrationAccount().withAccountName("classichydrationprodsn01") + .withSubscriptionId("e4eae963-2d15-43e6-a097-98bd75b33edd")))) + .withOverrideEndpointLevelFields( + new FrontloadPayloadPropertiesOverrideEndpointLevelFields().withEnabled(true) + .withApiVersions(Arrays.asList("2024-04-01-preview")) + .withEndpointUri("https://resource-endpoint.com/") + .withLocations(Arrays.asList("East US")) + .withRequiredFeatures(Arrays.asList("")) + .withFeaturesRule(new ResourceTypeEndpointBaseFeaturesRule()) + .withTimeout(Duration.parse("PT20S")) + .withEndpointType(EndpointType.PRODUCTION) + .withDstsConfiguration( + new ResourceTypeEndpointBaseDstsConfiguration().withServiceName("resourceprovider") + .withServiceDnsName("messaging.azure-ppe.net")) + .withSkuLink("http://endpointuri/westus/skus") + .withApiVersion("2024-04-01-preview") + .withZones(Arrays.asList("zone1"))) + .withIgnoreFields(Arrays.asList("apiversion"))), com.azure.core.util.Context.NONE); } } @@ -945,22 +1587,25 @@ public final class SkusCreateOrUpdateNestedResourceTypeThirdSamples { ### Skus_Delete ```java +import java.util.UUID; + /** - * Samples for Skus Delete. + * Samples for AuthorizedApplications Delete. */ -public final class SkusDeleteSamples { +public final class AuthorizedApplicationsDeleteSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Delete.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_Delete.json */ /** - * Sample code: Skus_Delete. + * Sample code: AuthorizedApplications_Delete. * * @param manager Entry point to ProviderHubManager. */ - public static void skusDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .deleteWithResponse("Microsoft.Contoso", "testResourceType", "testSku", com.azure.core.util.Context.NONE); + public static void authorizedApplicationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications() + .deleteWithResponse("Microsoft.Contoso", UUID.fromString("760505bf-dcfa-4311-b890-18da392a00b2"), + com.azure.core.util.Context.NONE); } } ``` @@ -968,24 +1613,242 @@ public final class SkusDeleteSamples { ### Skus_DeleteNestedResourceTypeFirst ```java +import com.azure.resourcemanager.providerhub.models.AdditionalOptionsResourceTypeRegistration; +import com.azure.resourcemanager.providerhub.models.AllowedResourceName; +import com.azure.resourcemanager.providerhub.models.ApiProfile; +import com.azure.resourcemanager.providerhub.models.AsyncTimeoutRule; +import com.azure.resourcemanager.providerhub.models.AvailabilityZonePolicy; +import com.azure.resourcemanager.providerhub.models.CapacityPolicy; +import com.azure.resourcemanager.providerhub.models.CommonApiVersionsMergeMode; +import com.azure.resourcemanager.providerhub.models.CrossTenantTokenValidation; +import com.azure.resourcemanager.providerhub.models.DeleteDependency; +import com.azure.resourcemanager.providerhub.models.FilterOption; +import com.azure.resourcemanager.providerhub.models.LegacyDisallowedCondition; +import com.azure.resourcemanager.providerhub.models.LegacyOperation; +import com.azure.resourcemanager.providerhub.models.LinkedAction; +import com.azure.resourcemanager.providerhub.models.LinkedOperation; +import com.azure.resourcemanager.providerhub.models.LinkedOperationRule; +import com.azure.resourcemanager.providerhub.models.Notification; +import com.azure.resourcemanager.providerhub.models.NotificationType; +import com.azure.resourcemanager.providerhub.models.OpenApiConfiguration; +import com.azure.resourcemanager.providerhub.models.OpenApiValidation; +import com.azure.resourcemanager.providerhub.models.OptOutHeaderType; +import com.azure.resourcemanager.providerhub.models.Policy; +import com.azure.resourcemanager.providerhub.models.PolicyExecutionType; +import com.azure.resourcemanager.providerhub.models.Readiness; +import com.azure.resourcemanager.providerhub.models.Regionality; +import com.azure.resourcemanager.providerhub.models.ResourceAccessPolicy; +import com.azure.resourcemanager.providerhub.models.ResourceConcurrencyControlOption; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpoint; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationProperties; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesCapacityRule; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesDstsConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesLegacyPolicy; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesManagement; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesMarketplaceOptions; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesRequestHeaderOptions; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceCache; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptions; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceQueryManagement; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesRoutingRule; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy; +import com.azure.resourcemanager.providerhub.models.RoutingType; +import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; +import com.azure.resourcemanager.providerhub.models.SkipNotifications; +import com.azure.resourcemanager.providerhub.models.SupportedOperations; +import com.azure.resourcemanager.providerhub.models.SwaggerSpecification; +import com.azure.resourcemanager.providerhub.models.TemplateDeploymentCapabilities; +import com.azure.resourcemanager.providerhub.models.TemplateDeploymentPreflightNotifications; +import com.azure.resourcemanager.providerhub.models.TemplateDeploymentPreflightOptions; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for Skus DeleteNestedResourceTypeFirst. + * Samples for ResourceTypeRegistrations CreateOrUpdate. */ -public final class SkusDeleteNestedResourceTypeFirstSamples { +public final class ResourceTypeRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_DeleteNestedResourceTypeFirst.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ResourceTypeRegistrations_CreateOrUpdate.json */ /** - * Sample code: Skus_DeleteNestedResourceTypeFirst. + * Sample code: ResourceTypeRegistrations_CreateOrUpdate. * * @param manager Entry point to ProviderHubManager. */ public static void - skusDeleteNestedResourceTypeFirst(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .deleteNestedResourceTypeFirstWithResponse("Microsoft.Contoso", "testResourceType", - "nestedResourceTypeFirst", "testSku", com.azure.core.util.Context.NONE); + resourceTypeRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceTypeRegistrations() + .define("employees") + .withExistingProviderRegistration("Microsoft.Contoso") + .withProperties(new ResourceTypeRegistrationProperties().withRoutingType(RoutingType.DEFAULT) + .withCrossTenantTokenValidation(CrossTenantTokenValidation.ENSURE_SECURE_VALIDATION) + .withRegionality(Regionality.REGIONAL) + .withEndpoints( + Arrays.asList(new ResourceTypeEndpoint().withApiVersions(Arrays.asList("2020-06-01-preview")) + .withLocations(Arrays.asList("West US", "East US", "North Europe")) + .withRequiredFeatures(Arrays.asList("")))) + .withSwaggerSpecifications(Arrays.asList(new SwaggerSpecification() + .withApiVersions(Arrays.asList("2020-06-01-preview")) + .withSwaggerSpecFolderUri( + "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"))) + .withRequestHeaderOptions(new ResourceTypeRegistrationPropertiesRequestHeaderOptions() + .withOptOutHeaders(OptOutHeaderType.SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY)) + .withResourceConcurrencyControlOptions(mapOf("patch", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "post", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "put", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION))) + .withResourceGraphConfiguration( + new ResourceTypeRegistrationPropertiesResourceGraphConfiguration().withEnabled(true) + .withApiVersion("2019-01-01")) + .withManagement(new ResourceTypeRegistrationPropertiesManagement() + .withManifestOwners(Arrays.asList("SPARTA-PlatformServiceAdministrator")) + .withAuthorizationOwners(Arrays.asList("RPAAS-PlatformServiceAdministrator")) + .withIncidentRoutingService("") + .withIncidentRoutingTeam("") + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos( + Arrays.asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT))) + .withResourceAccessPolicy(ResourceAccessPolicy.NOT_SPECIFIED)) + .withOpenApiConfiguration(new OpenApiConfiguration() + .withValidation(new OpenApiValidation().withAllowNoncompliantCollectionResponse(true))) + .withMetadata(mapOf()) + .withNotifications( + Arrays.asList(new Notification().withNotificationType(NotificationType.SUBSCRIPTION_NOTIFICATION) + .withSkipNotifications(SkipNotifications.DISABLED)))) + .create(); + } + + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * DirectResourceTypeRegistrations_CreateOrUpdate.json + */ + /** + * Sample code: DirectResourceTypeRegistrations_CreateOrUpdate.json. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void directResourceTypeRegistrationsCreateOrUpdateJson( + com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceTypeRegistrations() + .define("employees") + .withExistingProviderRegistration("Microsoft.Contoso") + .withProperties(new ResourceTypeRegistrationProperties().withRoutingType(RoutingType.DEFAULT) + .withAdditionalOptions(AdditionalOptionsResourceTypeRegistration.PROTECTED_ASYNC_OPERATION_POLLING) + .withRegionality(Regionality.REGIONAL) + .withEndpoints( + Arrays.asList(new ResourceTypeEndpoint().withApiVersions(Arrays.asList("2020-06-01-preview")) + .withLocations(Arrays.asList("West US", "East US", "North Europe")) + .withRequiredFeatures(Arrays.asList("")))) + .withSwaggerSpecifications(Arrays.asList(new SwaggerSpecification() + .withApiVersions(Arrays.asList("2020-06-01-preview")) + .withSwaggerSpecFolderUri( + "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"))) + .withRequestHeaderOptions(new ResourceTypeRegistrationPropertiesRequestHeaderOptions() + .withOptOutHeaders(OptOutHeaderType.SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY)) + .withResourceConcurrencyControlOptions(mapOf("patch", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "post", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "put", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION))) + .withResourceGraphConfiguration( + new ResourceTypeRegistrationPropertiesResourceGraphConfiguration().withEnabled(true) + .withApiVersion("2019-01-01")) + .withManagement(new ResourceTypeRegistrationPropertiesManagement() + .withManifestOwners(Arrays.asList("SPARTA-PlatformServiceAdministrator")) + .withAuthorizationOwners(Arrays.asList("RPAAS-PlatformServiceAdministrator")) + .withIncidentRoutingService("") + .withIncidentRoutingTeam("") + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos( + Arrays.asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT))) + .withResourceAccessPolicy(ResourceAccessPolicy.NOT_SPECIFIED)) + .withOpenApiConfiguration(new OpenApiConfiguration() + .withValidation(new OpenApiValidation().withAllowNoncompliantCollectionResponse(true))) + .withMetadata(mapOf()) + .withNotifications( + Arrays.asList(new Notification().withNotificationType(NotificationType.SUBSCRIPTION_NOTIFICATION) + .withSkipNotifications(SkipNotifications.DISABLED))) + .withTemplateDeploymentPolicy(new ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy() + .withCapabilities(TemplateDeploymentCapabilities.PREFLIGHT) + .withPreflightOptions( + TemplateDeploymentPreflightOptions.fromString("ValidationRequests, DeploymentRequests")) + .withPreflightNotifications(TemplateDeploymentPreflightNotifications.NONE)) + .withAllowEmptyRoleAssignments(false) + .withPolicyExecutionType(PolicyExecutionType.BYPASS_POLICIES) + .withAvailabilityZoneRule(new ResourceTypeRegistrationPropertiesAvailabilityZoneRule() + .withAvailabilityZonePolicy(AvailabilityZonePolicy.MULTI_ZONED)) + .withDstsConfiguration( + new ResourceTypeRegistrationPropertiesDstsConfiguration().withServiceName("prds-shim") + .withServiceDnsName("prds.sparta.azure.com")) + .withAsyncTimeoutRules( + Arrays.asList(new AsyncTimeoutRule().withActionName("Microsoft.ClassicCompute/domainNames/write") + .withTimeout("PT12H"))) + .withCommonApiVersions(Arrays.asList("2021-01-01")) + .withApiProfiles( + Arrays.asList(new ApiProfile().withProfileVersion("2018-03-01-hybrid").withApiVersion("2018-02-01"), + new ApiProfile().withProfileVersion("2019-03-01-hybrid").withApiVersion("2016-06-01"))) + .withLinkedOperationRules(Arrays.asList( + new LinkedOperationRule().withLinkedOperation(LinkedOperation.CROSS_SUBSCRIPTION_RESOURCE_MOVE) + .withLinkedAction(LinkedAction.BLOCKED), + new LinkedOperationRule().withLinkedOperation(LinkedOperation.CROSS_RESOURCE_GROUP_RESOURCE_MOVE) + .withLinkedAction(LinkedAction.VALIDATE))) + .withLegacyName("legacyName") + .withLegacyNames(Arrays.asList("legacyName")) + .withAllowedTemplateDeploymentReferenceActions(Arrays.asList("ListKeys", "ListSAS")) + .withLegacyPolicy(new ResourceTypeRegistrationPropertiesLegacyPolicy() + .withDisallowedLegacyOperations(Arrays.asList(LegacyOperation.CREATE)) + .withDisallowedConditions(Arrays.asList(new LegacyDisallowedCondition() + .withDisallowedLegacyOperations(Arrays.asList(LegacyOperation.CREATE, LegacyOperation.DELETE)) + .withFeature("Microsoft.RP/ArmOnlyJobCollections")))) + .withManifestLink("https://azure.com") + .withCapacityRule( + new ResourceTypeRegistrationPropertiesCapacityRule().withCapacityPolicy(CapacityPolicy.RESTRICTED) + .withSkuAlias("incorrectAlias")) + .withMarketplaceOptions( + new ResourceTypeRegistrationPropertiesMarketplaceOptions().withAddOnPlanConversionAllowed(true)) + .withAllowedResourceNames( + Arrays.asList(new AllowedResourceName().withName("name1").withGetActionVerb("list"), + new AllowedResourceName().withName("name2"))) + .withResourceCache(new ResourceTypeRegistrationPropertiesResourceCache().withEnableResourceCache(true) + .withResourceCacheExpirationTimespan("PT2M")) + .withResourceQueryManagement(new ResourceTypeRegistrationPropertiesResourceQueryManagement() + .withFilterOption(FilterOption.ENABLE_SUBSCRIPTION_FILTER_ON_TENANT)) + .withSupportsTags(true) + .withResourceManagementOptions(new ResourceTypeRegistrationPropertiesResourceManagementOptions() + .withBatchProvisioningSupport( + new ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport() + .withSupportedOperations(SupportedOperations.fromString("Get, Delete"))) + .withDeleteDependencies(Arrays + .asList(new DeleteDependency().withLinkedProperty("properties.edgeProfile.subscription.id")))) + .withGroupingTag("groupingTag") + .withAddResourceListTargetLocations(true) + .withResourceTypeCommonAttributeManagement( + new ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement() + .withCommonApiVersionsMergeMode(CommonApiVersionsMergeMode.MERGE)) + .withRoutingRule( + new ResourceTypeRegistrationPropertiesRoutingRule().withHostResourceType("servers/databases"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -994,23 +1857,21 @@ public final class SkusDeleteNestedResourceTypeFirstSamples { ```java /** - * Samples for Skus DeleteNestedResourceTypeSecond. + * Samples for NotificationRegistrations Get. */ -public final class SkusDeleteNestedResourceTypeSecondSamples { +public final class NotificationRegistrationsGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_DeleteNestedResourceTypeSecond.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NotificationRegistrations_Get.json */ /** - * Sample code: Skus_DeleteNestedResourceTypeSecond. + * Sample code: NotificationRegistrations_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void - skusDeleteNestedResourceTypeSecond(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .deleteNestedResourceTypeSecondWithResponse("Microsoft.Contoso", "testResourceType", - "nestedResourceTypeFirst", "nestedResourceTypeSecond", "testSku", com.azure.core.util.Context.NONE); + public static void notificationRegistrationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.notificationRegistrations() + .getWithResponse("Microsoft.Contoso", "fooNotificationRegistration", com.azure.core.util.Context.NONE); } } ``` @@ -1019,24 +1880,22 @@ public final class SkusDeleteNestedResourceTypeSecondSamples { ```java /** - * Samples for Skus DeleteNestedResourceTypeThird. + * Samples for Operations ListByProviderRegistration. */ -public final class SkusDeleteNestedResourceTypeThirdSamples { +public final class OperationsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_DeleteNestedResourceTypeThird.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * Operations_ListByProviderRegistration.json */ /** - * Sample code: Skus_DeleteNestedResourceTypeThird. + * Sample code: Operations_ListByProviderRegistration. * * @param manager Entry point to ProviderHubManager. */ public static void - skusDeleteNestedResourceTypeThird(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .deleteNestedResourceTypeThirdWithResponse("Microsoft.Contoso", "testResourceType", - "nestedResourceTypeFirst", "nestedResourceTypeSecond", "nestedResourceTypeThird", "testSku", - com.azure.core.util.Context.NONE); + operationsListByProviderRegistration(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.operations() + .listByProviderRegistrationWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` @@ -1045,21 +1904,21 @@ public final class SkusDeleteNestedResourceTypeThirdSamples { ```java /** - * Samples for Skus Get. + * Samples for ProviderMonitorSettings Delete. */ -public final class SkusGetSamples { +public final class ProviderMonitorSettingsDeleteSamples { /* - * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Get.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Delete.json */ /** - * Sample code: Skus_Get. + * Sample code: ProviderMonitorSettings_Delete. * * @param manager Entry point to ProviderHubManager. */ - public static void skusGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .getWithResponse("Microsoft.Contoso", "testResourceType", "testSku", com.azure.core.util.Context.NONE); + public static void providerMonitorSettingsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .deleteByResourceGroupWithResponse("default", "ContosoMonitorSetting", com.azure.core.util.Context.NONE); } } ``` @@ -1068,23 +1927,22 @@ public final class SkusGetSamples { ```java /** - * Samples for Skus GetNestedResourceTypeFirst. + * Samples for CustomRollouts Get. */ -public final class SkusGetNestedResourceTypeFirstSamples { +public final class CustomRolloutsGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_GetNestedResourceTypeFirst.json + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Get. + * json */ /** - * Sample code: Skus_GetNestedResourceTypeFirst. + * Sample code: CustomRollouts_Get. * * @param manager Entry point to ProviderHubManager. */ - public static void - skusGetNestedResourceTypeFirst(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .getNestedResourceTypeFirstWithResponse("Microsoft.Contoso", "testResourceType", "nestedResourceTypeFirst", - "testSku", com.azure.core.util.Context.NONE); + public static void customRolloutsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.customRollouts() + .getWithResponse("Microsoft.Contoso", "canaryTesting99", com.azure.core.util.Context.NONE); } } ``` @@ -1093,23 +1951,24 @@ public final class SkusGetNestedResourceTypeFirstSamples { ```java /** - * Samples for Skus GetNestedResourceTypeSecond. + * Samples for ProviderMonitorSettings Create. */ -public final class SkusGetNestedResourceTypeSecondSamples { +public final class ProviderMonitorSettingsCreateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_GetNestedResourceTypeSecond.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Create.json */ /** - * Sample code: Skus_GetNestedResourceTypeSecond. + * Sample code: ProviderMonitorSettings_Create. * * @param manager Entry point to ProviderHubManager. */ - public static void - skusGetNestedResourceTypeSecond(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .getNestedResourceTypeSecondWithResponse("Microsoft.Contoso", "testResourceType", "nestedResourceTypeFirst", - "nestedResourceTypeSecond", "testSku", com.azure.core.util.Context.NONE); + public static void providerMonitorSettingsCreate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .define("ContosoMonitorSetting") + .withRegion("eastus") + .withExistingResourceGroup("default") + .create(); } } ``` @@ -1117,24 +1976,38 @@ public final class SkusGetNestedResourceTypeSecondSamples { ### Skus_GetNestedResourceTypeThird ```java +import com.azure.resourcemanager.providerhub.models.DefaultRolloutProperties; +import com.azure.resourcemanager.providerhub.models.DefaultRolloutPropertiesSpecification; +import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationCanary; +import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationExpeditedRollout; +import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo; +import java.time.Duration; +import java.util.Arrays; + /** - * Samples for Skus GetNestedResourceTypeThird. + * Samples for DefaultRollouts CreateOrUpdate. */ -public final class SkusGetNestedResourceTypeThirdSamples { +public final class DefaultRolloutsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_GetNestedResourceTypeThird.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * DefaultRollouts_CreateOrUpdate.json */ /** - * Sample code: Skus_GetNestedResourceTypeThird. + * Sample code: DefaultRollouts_CreateOrUpdate. * * @param manager Entry point to ProviderHubManager. */ - public static void - skusGetNestedResourceTypeThird(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .getNestedResourceTypeThirdWithResponse("Microsoft.Contoso", "testResourceType", "nestedResourceTypeFirst", - "nestedResourceTypeSecond", "nestedResourceTypeThird", "testSku", com.azure.core.util.Context.NONE); + public static void defaultRolloutsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.defaultRollouts() + .define("2020week10") + .withExistingProviderRegistration("Microsoft.Contoso") + .withProperties( + new DefaultRolloutProperties().withSpecification(new DefaultRolloutPropertiesSpecification() + .withExpeditedRollout(new DefaultRolloutSpecificationExpeditedRollout().withEnabled(true)) + .withCanary(new DefaultRolloutSpecificationCanary().withSkipRegions(Arrays.asList("eastus2euap"))) + .withRestOfTheWorldGroupTwo(new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() + .withWaitDuration(Duration.parse("PT4H"))))) + .create(); } } ``` @@ -1142,23 +2015,33 @@ public final class SkusGetNestedResourceTypeThirdSamples { ### Skus_ListByResourceTypeRegistrations ```java +import com.azure.resourcemanager.providerhub.models.ResourceManagementAction; +import com.azure.resourcemanager.providerhub.models.ResourceManagementEntity; +import java.util.Arrays; + /** - * Samples for Skus ListByResourceTypeRegistrations. + * Samples for ResourceActions DeleteResources. */ -public final class SkusListByResourceTypeRegistrationsSamples { +public final class ResourceActionsDeleteResourcesSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_ListByResourceTypeRegistrations.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ResourceActions_DeleteResources.json */ /** - * Sample code: Skus_ListByResourceTypeRegistrations. + * Sample code: ResourceActions_DeleteResources. * * @param manager Entry point to ProviderHubManager. */ public static void - skusListByResourceTypeRegistrations(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .listByResourceTypeRegistrations("Microsoft.Contoso", "testResourceType", com.azure.core.util.Context.NONE); + resourceActionsDeleteResources(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceActions() + .deleteResources("Microsoft.Contoso", "default", + new ResourceManagementAction().withResources(Arrays.asList(new ResourceManagementEntity() + .withResourceId( + "/subscriptions/ab7a8701-f7ef-471a-a2f4-d0ebbf494f77/providers/Microsoft.Contoso/employee/test") + .withHomeTenantId("11111111-f7ef-471a-a2f4-d0ebbf494f77") + .withLocation("southeastasia"))), + com.azure.core.util.Context.NONE); } } ``` @@ -1167,23 +2050,21 @@ public final class SkusListByResourceTypeRegistrationsSamples { ```java /** - * Samples for Skus ListByResourceTypeRegistrationsNestedResourceTypeFirst. + * Samples for ProviderMonitorSettings List. */ -public final class SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSamples { +public final class ProviderMonitorSettingsListSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_ListBySubscription.json */ /** - * Sample code: Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst. + * Sample code: ProviderMonitorSettings_ListBySubscription. * * @param manager Entry point to ProviderHubManager. */ - public static void skusListByResourceTypeRegistrationsNestedResourceTypeFirst( - com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .listByResourceTypeRegistrationsNestedResourceTypeFirst("Microsoft.Contoso", "testResourceType", - "nestedResourceTypeFirst", com.azure.core.util.Context.NONE); + public static void + providerMonitorSettingsListBySubscription(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings().list(com.azure.core.util.Context.NONE); } } ``` @@ -1192,23 +2073,21 @@ public final class SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSam ```java /** - * Samples for Skus ListByResourceTypeRegistrationsNestedResourceTypeSecond. + * Samples for Operations Delete. */ -public final class SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSamples { +public final class OperationsDeleteSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond.json + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Operations_Delete. + * json */ /** - * Sample code: Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond. + * Sample code: Operations_Delete. * * @param manager Entry point to ProviderHubManager. */ - public static void skusListByResourceTypeRegistrationsNestedResourceTypeSecond( - com.azure.resourcemanager.providerhub.ProviderHubManager manager) { - manager.skus() - .listByResourceTypeRegistrationsNestedResourceTypeSecond("Microsoft.Contoso", "testResourceType", - "nestedResourceTypeFirst", "nestedResourceTypeSecond", com.azure.core.util.Context.NONE); + public static void operationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.operations().deleteWithResponse("Microsoft.Contoso", com.azure.core.util.Context.NONE); } } ``` @@ -1221,7 +2100,7 @@ public final class SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSa */ public final class SkusListByResourceTypeRegistrationsNestedResourceTypeThirdSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_ListByResourceTypeRegistrationsNestedResourceTypeThird.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/pom.xml b/sdk/providerhub/azure-resourcemanager-providerhub/pom.xml index 740c6f66bba0..29f056fdd876 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/pom.xml +++ b/sdk/providerhub/azure-resourcemanager-providerhub/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for ProviderHub Management - This package contains Microsoft Azure SDK for ProviderHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft ProviderHub. Package tag package-2020-11-20. + This package contains Microsoft Azure SDK for ProviderHub Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Provider Hub. Package tag package-2024-09-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/ProviderHubManager.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/ProviderHubManager.java index 3ad48ea066a1..e51cd84ba0bf 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/ProviderHubManager.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/ProviderHubManager.java @@ -22,22 +22,31 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.providerhub.fluent.ProviderHub; +import com.azure.resourcemanager.providerhub.implementation.AuthorizedApplicationsImpl; import com.azure.resourcemanager.providerhub.implementation.CustomRolloutsImpl; import com.azure.resourcemanager.providerhub.implementation.DefaultRolloutsImpl; +import com.azure.resourcemanager.providerhub.implementation.NewRegionFrontloadReleasesImpl; import com.azure.resourcemanager.providerhub.implementation.NotificationRegistrationsImpl; import com.azure.resourcemanager.providerhub.implementation.OperationsImpl; import com.azure.resourcemanager.providerhub.implementation.ProviderHubBuilder; +import com.azure.resourcemanager.providerhub.implementation.ProviderMonitorSettingsImpl; import com.azure.resourcemanager.providerhub.implementation.ProviderRegistrationsImpl; +import com.azure.resourcemanager.providerhub.implementation.ResourceActionsImpl; import com.azure.resourcemanager.providerhub.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.providerhub.implementation.ResourceTypeRegistrationsImpl; import com.azure.resourcemanager.providerhub.implementation.SkusImpl; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplications; import com.azure.resourcemanager.providerhub.models.CustomRollouts; import com.azure.resourcemanager.providerhub.models.DefaultRollouts; +import com.azure.resourcemanager.providerhub.models.NewRegionFrontloadReleases; import com.azure.resourcemanager.providerhub.models.NotificationRegistrations; import com.azure.resourcemanager.providerhub.models.Operations; +import com.azure.resourcemanager.providerhub.models.ProviderMonitorSettings; import com.azure.resourcemanager.providerhub.models.ProviderRegistrations; +import com.azure.resourcemanager.providerhub.models.ResourceActions; import com.azure.resourcemanager.providerhub.models.ResourceProviders; import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrations; import com.azure.resourcemanager.providerhub.models.Skus; @@ -45,12 +54,13 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * Entry point to ProviderHubManager. - * Microsoft ProviderHub. + * Provider Hub. */ public final class ProviderHubManager { private CustomRollouts customRollouts; @@ -69,6 +79,14 @@ public final class ProviderHubManager { private Skus skus; + private ResourceActions resourceActions; + + private AuthorizedApplications authorizedApplications; + + private ProviderMonitorSettings providerMonitorSettings; + + private NewRegionFrontloadReleases newRegionFrontloadReleases; + private final ProviderHub clientObject; private ProviderHubManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -121,6 +139,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-providerhub.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -228,12 +249,14 @@ public ProviderHubManager authenticate(TokenCredential credential, AzureProfile Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.providerhub") .append("/") - .append("1.1.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -377,6 +400,57 @@ public Skus skus() { return skus; } + /** + * Gets the resource collection API of ResourceActions. + * + * @return Resource collection API of ResourceActions. + */ + public ResourceActions resourceActions() { + if (this.resourceActions == null) { + this.resourceActions = new ResourceActionsImpl(clientObject.getResourceActions(), this); + } + return resourceActions; + } + + /** + * Gets the resource collection API of AuthorizedApplications. It manages AuthorizedApplication. + * + * @return Resource collection API of AuthorizedApplications. + */ + public AuthorizedApplications authorizedApplications() { + if (this.authorizedApplications == null) { + this.authorizedApplications + = new AuthorizedApplicationsImpl(clientObject.getAuthorizedApplications(), this); + } + return authorizedApplications; + } + + /** + * Gets the resource collection API of ProviderMonitorSettings. It manages ProviderMonitorSetting. + * + * @return Resource collection API of ProviderMonitorSettings. + */ + public ProviderMonitorSettings providerMonitorSettings() { + if (this.providerMonitorSettings == null) { + this.providerMonitorSettings + = new ProviderMonitorSettingsImpl(clientObject.getProviderMonitorSettings(), this); + } + return providerMonitorSettings; + } + + /** + * Gets the resource collection API of NewRegionFrontloadReleases. + * + * @return Resource collection API of NewRegionFrontloadReleases. + */ + public NewRegionFrontloadReleases newRegionFrontloadReleases() { + if (this.newRegionFrontloadReleases == null) { + this.newRegionFrontloadReleases + = new NewRegionFrontloadReleasesImpl(clientObject.getNewRegionFrontloadReleases(), this); + } + return newRegionFrontloadReleases; + } + /** * Gets wrapped service client ProviderHub providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/AuthorizedApplicationsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/AuthorizedApplicationsClient.java new file mode 100644 index 000000000000..9a96fa582bab --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/AuthorizedApplicationsClient.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.providerhub.fluent.models.AuthorizedApplicationInner; +import java.util.UUID; + +/** + * An instance of this class provides access to all the operations defined in AuthorizedApplicationsClient. + */ +public interface AuthorizedApplicationsClient { + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String providerNamespace, UUID applicationId, Context context); + + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AuthorizedApplicationInner get(String providerNamespace, UUID applicationId); + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AuthorizedApplicationInner> + beginCreateOrUpdate(String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties); + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AuthorizedApplicationInner> beginCreateOrUpdate( + String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties, Context context); + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AuthorizedApplicationInner createOrUpdate(String providerNamespace, UUID applicationId, + AuthorizedApplicationInner properties); + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AuthorizedApplicationInner createOrUpdate(String providerNamespace, UUID applicationId, + AuthorizedApplicationInner properties, Context context); + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String providerNamespace, UUID applicationId, Context context); + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String providerNamespace, UUID applicationId); + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String providerNamespace); + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String providerNamespace, Context context); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/CustomRolloutsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/CustomRolloutsClient.java index bd3044f44dfc..92486cb22b89 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/CustomRolloutsClient.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/CustomRolloutsClient.java @@ -8,7 +8,9 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.providerhub.fluent.models.CustomRolloutInner; /** @@ -42,6 +44,47 @@ public interface CustomRolloutsClient { @ServiceMethod(returns = ReturnType.SINGLE) CustomRolloutInner get(String providerNamespace, String rolloutName); + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String providerNamespace, String rolloutName, Context context); + + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String providerNamespace, String rolloutName); + + /** + * Creates or updates the rollout details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param properties The custom rollout properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CustomRolloutInner> beginCreateOrUpdate(String providerNamespace, + String rolloutName, CustomRolloutInner properties); + /** * Creates or updates the rollout details. * @@ -52,11 +95,11 @@ public interface CustomRolloutsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rollout details along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String providerNamespace, String rolloutName, - CustomRolloutInner properties, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CustomRolloutInner> beginCreateOrUpdate(String providerNamespace, + String rolloutName, CustomRolloutInner properties, Context context); /** * Creates or updates the rollout details. @@ -67,11 +110,27 @@ Response createOrUpdateWithResponse(String providerNamespace * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rollout details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CustomRolloutInner createOrUpdate(String providerNamespace, String rolloutName, CustomRolloutInner properties); + /** + * Creates or updates the rollout details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param properties The custom rollout properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomRolloutInner createOrUpdate(String providerNamespace, String rolloutName, CustomRolloutInner properties, + Context context); + /** * Gets the list of the custom rollouts for the given provider. * @@ -96,4 +155,30 @@ Response createOrUpdateWithResponse(String providerNamespace */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByProviderRegistration(String providerNamespace, Context context); + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopWithResponse(String providerNamespace, String rolloutName, Context context); + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String providerNamespace, String rolloutName); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/DefaultRolloutsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/DefaultRolloutsClient.java index 0815a4a20939..e3b1c211437c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/DefaultRolloutsClient.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/DefaultRolloutsClient.java @@ -79,7 +79,7 @@ public interface DefaultRolloutsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of default rollout definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DefaultRolloutInner> beginCreateOrUpdate(String providerNamespace, @@ -95,7 +95,7 @@ SyncPoller, DefaultRolloutInner> beginCreateOrUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of default rollout definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DefaultRolloutInner> beginCreateOrUpdate(String providerNamespace, @@ -110,7 +110,7 @@ SyncPoller, DefaultRolloutInner> beginCreateOrUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DefaultRolloutInner createOrUpdate(String providerNamespace, String rolloutName, DefaultRolloutInner properties); @@ -125,7 +125,7 @@ SyncPoller, DefaultRolloutInner> beginCreateOrUp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DefaultRolloutInner createOrUpdate(String providerNamespace, String rolloutName, DefaultRolloutInner properties, diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NewRegionFrontloadReleasesClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NewRegionFrontloadReleasesClient.java new file mode 100644 index 000000000000..b093a708eba1 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NewRegionFrontloadReleasesClient.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.providerhub.fluent.models.DefaultRolloutInner; +import com.azure.resourcemanager.providerhub.fluent.models.ResourceProviderManifestInner; +import com.azure.resourcemanager.providerhub.models.FrontloadPayload; + +/** + * An instance of this class provides access to all the operations defined in NewRegionFrontloadReleasesClient. + */ +public interface NewRegionFrontloadReleasesClient { + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateManifestWithResponse(String providerNamespace, + FrontloadPayload properties, Context context); + + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties 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. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ResourceProviderManifestInner generateManifest(String providerNamespace, FrontloadPayload properties); + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String providerNamespace, String releaseName, + FrontloadPayload properties, Context context); + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties 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. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DefaultRolloutInner createOrUpdate(String providerNamespace, String releaseName, FrontloadPayload properties); + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String providerNamespace, String releaseName, Context context); + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DefaultRolloutInner get(String providerNamespace, String releaseName); + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopWithResponse(String providerNamespace, String releaseName, Context context); + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stop(String providerNamespace, String releaseName); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NotificationRegistrationsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NotificationRegistrationsClient.java index 65a68b7ab031..ffb6926d5f20 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NotificationRegistrationsClient.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/NotificationRegistrationsClient.java @@ -53,7 +53,7 @@ Response getWithResponse(String providerNamespace * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the notification registration definition along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse(String providerNamespace, @@ -68,7 +68,7 @@ Response createOrUpdateWithResponse(String provid * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the notification registration definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) NotificationRegistrationInner createOrUpdate(String providerNamespace, String notificationRegistrationName, diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/OperationsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/OperationsClient.java index d762da1eae84..4e4b2cf5aecf 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/OperationsClient.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/OperationsClient.java @@ -9,9 +9,8 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsContentInner; import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import com.azure.resourcemanager.providerhub.models.OperationsPutContent; +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; import java.util.List; /** @@ -78,8 +77,8 @@ Response> listByProviderRegistrationWithResponse * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String providerNamespace, - OperationsPutContent operationsPutContent, Context context); + Response createOrUpdateWithResponse(String providerNamespace, + OperationsPutContentInner operationsPutContent, Context context); /** * Creates or updates the operation supported by the given provider. @@ -92,7 +91,7 @@ Response createOrUpdateWithResponse(String providerNames * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationsContentInner createOrUpdate(String providerNamespace, OperationsPutContent operationsPutContent); + OperationsPutContentInner createOrUpdate(String providerNamespace, OperationsPutContentInner operationsPutContent); /** * Deletes an operation. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderHub.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderHub.java index 3894ea9e56f6..7aca28c63d85 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderHub.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderHub.java @@ -101,4 +101,32 @@ public interface ProviderHub { * @return the SkusClient object. */ SkusClient getSkus(); + + /** + * Gets the ResourceActionsClient object to access its operations. + * + * @return the ResourceActionsClient object. + */ + ResourceActionsClient getResourceActions(); + + /** + * Gets the AuthorizedApplicationsClient object to access its operations. + * + * @return the AuthorizedApplicationsClient object. + */ + AuthorizedApplicationsClient getAuthorizedApplications(); + + /** + * Gets the ProviderMonitorSettingsClient object to access its operations. + * + * @return the ProviderMonitorSettingsClient object. + */ + ProviderMonitorSettingsClient getProviderMonitorSettings(); + + /** + * Gets the NewRegionFrontloadReleasesClient object to access its operations. + * + * @return the NewRegionFrontloadReleasesClient object. + */ + NewRegionFrontloadReleasesClient getNewRegionFrontloadReleases(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderMonitorSettingsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderMonitorSettingsClient.java new file mode 100644 index 000000000000..c86c54fb7a35 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ProviderMonitorSettingsClient.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.providerhub.fluent.models.ProviderMonitorSettingInner; + +/** + * An instance of this class provides access to all the operations defined in ProviderMonitorSettingsClient. + */ +public interface ProviderMonitorSettingsClient { + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String providerMonitorSettingName, Context context); + + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProviderMonitorSettingInner getByResourceGroup(String resourceGroupName, String providerMonitorSettingName); + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ProviderMonitorSettingInner> beginCreate( + String resourceGroupName, String providerMonitorSettingName, ProviderMonitorSettingInner properties); + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ProviderMonitorSettingInner> beginCreate( + String resourceGroupName, String providerMonitorSettingName, ProviderMonitorSettingInner properties, + Context context); + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProviderMonitorSettingInner create(String resourceGroupName, String providerMonitorSettingName, + ProviderMonitorSettingInner properties); + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProviderMonitorSettingInner create(String resourceGroupName, String providerMonitorSettingName, + ProviderMonitorSettingInner properties, Context context); + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, + String providerMonitorSettingName, Context context); + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProviderMonitorSettingInner update(String resourceGroupName, String providerMonitorSettingName); + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String providerMonitorSettingName, Context context); + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String providerMonitorSettingName); + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceActionsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceActionsClient.java new file mode 100644 index 000000000000..4a09ddb76933 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceActionsClient.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.providerhub.models.ResourceManagementAction; + +/** + * An instance of this class provides access to all the operations defined in ResourceActionsClient. + */ +public interface ResourceActionsClient { + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties); + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties, Context context); + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteResources(String providerNamespace, String resourceActionName, ResourceManagementAction properties); + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteResources(String providerNamespace, String resourceActionName, ResourceManagementAction properties, + Context context); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceTypeRegistrationsClient.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceTypeRegistrationsClient.java index dcc21c9401b8..ae47ad5507d9 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceTypeRegistrationsClient.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/ResourceTypeRegistrationsClient.java @@ -111,6 +111,19 @@ ResourceTypeRegistrationInner createOrUpdate(String providerNamespace, String re ResourceTypeRegistrationInner createOrUpdate(String providerNamespace, String resourceType, ResourceTypeRegistrationInner properties, Context context); + /** + * Deletes a resource type. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceType The resource type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String providerNamespace, String resourceType); + /** * Deletes a resource type. * @@ -120,10 +133,10 @@ ResourceTypeRegistrationInner createOrUpdate(String providerNamespace, String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String providerNamespace, String resourceType, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String providerNamespace, String resourceType, Context context); /** * Deletes a resource type. @@ -137,6 +150,19 @@ ResourceTypeRegistrationInner createOrUpdate(String providerNamespace, String re @ServiceMethod(returns = ReturnType.SINGLE) void delete(String providerNamespace, String resourceType); + /** + * Deletes a resource type. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceType The resource type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String providerNamespace, String resourceType, Context context); + /** * Gets the list of the resource types for the given provider. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/AuthorizedApplicationInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/AuthorizedApplicationInner.java new file mode 100644 index 000000000000..ff87dac265b0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/AuthorizedApplicationInner.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.fluent.models; + +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.providerhub.models.AuthorizedApplicationProperties; +import java.io.IOException; + +/** + * The AuthorizedApplication model. + */ +@Fluent +public final class AuthorizedApplicationInner extends ProxyResource { + /* + * The properties property. + */ + private AuthorizedApplicationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of AuthorizedApplicationInner class. + */ + public AuthorizedApplicationInner() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public AuthorizedApplicationProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the AuthorizedApplicationInner object itself. + */ + public AuthorizedApplicationInner withProperties(AuthorizedApplicationProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + 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 AuthorizedApplicationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthorizedApplicationInner 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 AuthorizedApplicationInner. + */ + public static AuthorizedApplicationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthorizedApplicationInner deserializedAuthorizedApplicationInner = new AuthorizedApplicationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAuthorizedApplicationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAuthorizedApplicationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAuthorizedApplicationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedAuthorizedApplicationInner.properties + = AuthorizedApplicationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAuthorizedApplicationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthorizedApplicationInner; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CheckinManifestInfoInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CheckinManifestInfoInner.java index 78a13bd05cee..9cd98aef9fb1 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CheckinManifestInfoInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CheckinManifestInfoInner.java @@ -16,24 +16,24 @@ * The CheckinManifestInfo model. */ @Fluent -public final class CheckinManifestInfoInner implements JsonSerializable { +public class CheckinManifestInfoInner implements JsonSerializable { /* - * The isCheckedIn property. + * Whether the manifest is checked in. */ private boolean isCheckedIn; /* - * The statusMessage property. + * The status message. */ private String statusMessage; /* - * The pullRequest property. + * The pull request. */ private String pullRequest; /* - * The commitId property. + * The commit id. */ private String commitId; @@ -44,7 +44,7 @@ public CheckinManifestInfoInner() { } /** - * Get the isCheckedIn property: The isCheckedIn property. + * Get the isCheckedIn property: Whether the manifest is checked in. * * @return the isCheckedIn value. */ @@ -53,7 +53,7 @@ public boolean isCheckedIn() { } /** - * Set the isCheckedIn property: The isCheckedIn property. + * Set the isCheckedIn property: Whether the manifest is checked in. * * @param isCheckedIn the isCheckedIn value to set. * @return the CheckinManifestInfoInner object itself. @@ -64,7 +64,7 @@ public CheckinManifestInfoInner withIsCheckedIn(boolean isCheckedIn) { } /** - * Get the statusMessage property: The statusMessage property. + * Get the statusMessage property: The status message. * * @return the statusMessage value. */ @@ -73,7 +73,7 @@ public String statusMessage() { } /** - * Set the statusMessage property: The statusMessage property. + * Set the statusMessage property: The status message. * * @param statusMessage the statusMessage value to set. * @return the CheckinManifestInfoInner object itself. @@ -84,7 +84,7 @@ public CheckinManifestInfoInner withStatusMessage(String statusMessage) { } /** - * Get the pullRequest property: The pullRequest property. + * Get the pullRequest property: The pull request. * * @return the pullRequest value. */ @@ -93,7 +93,7 @@ public String pullRequest() { } /** - * Set the pullRequest property: The pullRequest property. + * Set the pullRequest property: The pull request. * * @param pullRequest the pullRequest value to set. * @return the CheckinManifestInfoInner object itself. @@ -104,7 +104,7 @@ public CheckinManifestInfoInner withPullRequest(String pullRequest) { } /** - * Get the commitId property: The commitId property. + * Get the commitId property: The commit id. * * @return the commitId value. */ @@ -113,7 +113,7 @@ public String commitId() { } /** - * Set the commitId property: The commitId property. + * Set the commitId property: The commit id. * * @param commitId the commitId value to set. * @return the CheckinManifestInfoInner object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CustomRolloutInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CustomRolloutInner.java index faa37963543e..048a67eb8c75 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CustomRolloutInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/CustomRolloutInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; 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; @@ -14,7 +15,7 @@ import java.io.IOException; /** - * Rollout details. + * The CustomRollout model. */ @Fluent public final class CustomRolloutInner extends ProxyResource { @@ -23,6 +24,11 @@ public final class CustomRolloutInner extends ProxyResource { */ private CustomRolloutProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -64,6 +70,15 @@ public CustomRolloutInner withProperties(CustomRolloutProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -144,6 +159,8 @@ public static CustomRolloutInner fromJson(JsonReader jsonReader) throws IOExcept deserializedCustomRolloutInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedCustomRolloutInner.properties = CustomRolloutProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCustomRolloutInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/DefaultRolloutInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/DefaultRolloutInner.java index 0a9dab5d8ba2..be3efda3dc0b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/DefaultRolloutInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/DefaultRolloutInner.java @@ -6,6 +6,7 @@ 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; @@ -13,7 +14,7 @@ import java.io.IOException; /** - * Default rollout definition. + * The DefaultRollout model. */ @Fluent public final class DefaultRolloutInner extends ProxyResource { @@ -22,6 +23,11 @@ public final class DefaultRolloutInner extends ProxyResource { */ private DefaultRolloutProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -63,6 +69,15 @@ public DefaultRolloutInner withProperties(DefaultRolloutProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -138,6 +153,8 @@ public static DefaultRolloutInner fromJson(JsonReader jsonReader) throws IOExcep deserializedDefaultRolloutInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedDefaultRolloutInner.properties = DefaultRolloutProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDefaultRolloutInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/NotificationRegistrationInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/NotificationRegistrationInner.java index 7e4ce92c9bf3..a4cbfeeef79f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/NotificationRegistrationInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/NotificationRegistrationInner.java @@ -6,6 +6,7 @@ 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; @@ -13,7 +14,7 @@ import java.io.IOException; /** - * The notification registration definition. + * The NotificationRegistration model. */ @Fluent public final class NotificationRegistrationInner extends ProxyResource { @@ -22,6 +23,11 @@ public final class NotificationRegistrationInner extends ProxyResource { */ private NotificationRegistrationProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -63,6 +69,15 @@ public NotificationRegistrationInner withProperties(NotificationRegistrationProp return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -140,6 +155,8 @@ public static NotificationRegistrationInner fromJson(JsonReader jsonReader) thro } else if ("properties".equals(fieldName)) { deserializedNotificationRegistrationInner.properties = NotificationRegistrationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNotificationRegistrationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsContentInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsContentInner.java deleted file mode 100644 index c5eb7cbb564a..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsContentInner.java +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.fluent.models; - -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.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import java.io.IOException; - -/** - * The OperationsContent model. - */ -@Fluent -public final class OperationsContentInner extends ProxyResource { - /* - * Operations content. - */ - private OperationsDefinitionInner innerProperties; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of OperationsContentInner class. - */ - public OperationsContentInner() { - } - - /** - * Get the innerProperties property: Operations content. - * - * @return the innerProperties value. - */ - private OperationsDefinitionInner innerProperties() { - return this.innerProperties; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: Name of the operation. - * - * @return the name value. - */ - public String namePropertiesName() { - return this.innerProperties() == null ? null : this.innerProperties().name(); - } - - /** - * Set the name property: Name of the operation. - * - * @param name the name value to set. - * @return the OperationsContentInner object itself. - */ - public OperationsContentInner withNamePropertiesName(String name) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationsDefinitionInner(); - } - this.innerProperties().withName(name); - return this; - } - - /** - * Get the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.innerProperties() == null ? null : this.innerProperties().isDataAction(); - } - - /** - * Set the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationsContentInner object itself. - */ - public OperationsContentInner withIsDataAction(Boolean isDataAction) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationsDefinitionInner(); - } - this.innerProperties().withIsDataAction(isDataAction); - return this; - } - - /** - * Get the origin property: The origin property. - * - * @return the origin value. - */ - public OperationOrigins origin() { - return this.innerProperties() == null ? null : this.innerProperties().origin(); - } - - /** - * Set the origin property: The origin property. - * - * @param origin the origin value to set. - * @return the OperationsContentInner object itself. - */ - public OperationsContentInner withOrigin(OperationOrigins origin) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationsDefinitionInner(); - } - this.innerProperties().withOrigin(origin); - return this; - } - - /** - * Get the display property: Display information of the operation. - * - * @return the display value. - */ - public OperationsDefinitionDisplay display() { - return this.innerProperties() == null ? null : this.innerProperties().display(); - } - - /** - * Set the display property: Display information of the operation. - * - * @param display the display value to set. - * @return the OperationsContentInner object itself. - */ - public OperationsContentInner withDisplay(OperationsDefinitionDisplay display) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationsDefinitionInner(); - } - this.innerProperties().withDisplay(display); - return this; - } - - /** - * Get the actionType property: The actionType property. - * - * @return the actionType value. - */ - public OperationActionType actionType() { - return this.innerProperties() == null ? null : this.innerProperties().actionType(); - } - - /** - * Set the actionType property: The actionType property. - * - * @param actionType the actionType value to set. - * @return the OperationsContentInner object itself. - */ - public OperationsContentInner withActionType(OperationActionType actionType) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationsDefinitionInner(); - } - this.innerProperties().withActionType(actionType); - return this; - } - - /** - * Get the properties property: Anything. - * - * @return the properties value. - */ - public Object properties() { - return this.innerProperties() == null ? null : this.innerProperties().properties(); - } - - /** - * Set the properties property: Anything. - * - * @param properties the properties value to set. - * @return the OperationsContentInner object itself. - */ - public OperationsContentInner withProperties(Object properties) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationsDefinitionInner(); - } - this.innerProperties().withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - 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 OperationsContentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationsContentInner 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 OperationsContentInner. - */ - public static OperationsContentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationsContentInner deserializedOperationsContentInner = new OperationsContentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedOperationsContentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedOperationsContentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedOperationsContentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedOperationsContentInner.innerProperties = OperationsDefinitionInner.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationsContentInner; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsDefinitionInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsDefinitionInner.java index c812f2ecb4f5..be0d0db4c573 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsDefinitionInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/OperationsDefinitionInner.java @@ -31,7 +31,7 @@ public final class OperationsDefinitionInner implements JsonSerializable { + OperationsPutContentInner deserializedOperationsPutContentInner = new OperationsPutContentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedOperationsPutContentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationsPutContentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedOperationsPutContentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedOperationsPutContentInner.properties = OperationsPutContentProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedOperationsPutContentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationsPutContentInner; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderMonitorSettingInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderMonitorSettingInner.java new file mode 100644 index 000000000000..62cd1ad80518 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderMonitorSettingInner.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.providerhub.models.ProviderMonitorSettingProperties; +import java.io.IOException; +import java.util.Map; + +/** + * The ProviderMonitorSetting model. + */ +@Fluent +public final class ProviderMonitorSettingInner extends Resource { + /* + * The properties property. + */ + private ProviderMonitorSettingProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ProviderMonitorSettingInner class. + */ + public ProviderMonitorSettingInner() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public ProviderMonitorSettingProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the ProviderMonitorSettingInner object itself. + */ + public ProviderMonitorSettingInner withProperties(ProviderMonitorSettingProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderMonitorSettingInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderMonitorSettingInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + 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 ProviderMonitorSettingInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderMonitorSettingInner 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 ProviderMonitorSettingInner. + */ + public static ProviderMonitorSettingInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderMonitorSettingInner deserializedProviderMonitorSettingInner = new ProviderMonitorSettingInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedProviderMonitorSettingInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedProviderMonitorSettingInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedProviderMonitorSettingInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedProviderMonitorSettingInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedProviderMonitorSettingInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedProviderMonitorSettingInner.properties + = ProviderMonitorSettingProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedProviderMonitorSettingInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderMonitorSettingInner; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderRegistrationInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderRegistrationInner.java index 7b2a1a4802ac..19bc8152f87d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderRegistrationInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ProviderRegistrationInner.java @@ -6,9 +6,11 @@ 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.providerhub.models.ProviderRegistrationKind; import com.azure.resourcemanager.providerhub.models.ProviderRegistrationProperties; import java.io.IOException; @@ -22,6 +24,17 @@ public class ProviderRegistrationInner extends ProxyResource { */ private ProviderRegistrationProperties properties; + /* + * Provider registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + private ProviderRegistrationKind kind; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -63,6 +76,48 @@ public ProviderRegistrationInner withProperties(ProviderRegistrationProperties p return this; } + /** + * Get the kind property: Provider registration kind. This Metadata is also used by portal/tooling/etc to render + * different UX experiences for resources of the same type. + * + * @return the kind value. + */ + public ProviderRegistrationKind kind() { + return this.kind; + } + + /** + * Set the kind property: Provider registration kind. This Metadata is also used by portal/tooling/etc to render + * different UX experiences for resources of the same type. + * + * @param kind the kind value to set. + * @return the ProviderRegistrationInner object itself. + */ + public ProviderRegistrationInner withKind(ProviderRegistrationKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + 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 ProviderRegistrationInner object itself. + */ + ProviderRegistrationInner withSystemData(SystemData systemData) { + this.systemData = systemData; + return this; + } + /** * Get the type property: The type of the resource. * @@ -111,6 +166,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); return jsonWriter.writeEndObject(); } @@ -138,6 +194,11 @@ public static ProviderRegistrationInner fromJson(JsonReader jsonReader) throws I deserializedProviderRegistrationInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedProviderRegistrationInner.properties = ProviderRegistrationProperties.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedProviderRegistrationInner.kind + = ProviderRegistrationKind.fromString(reader.getString()); + } else if ("systemData".equals(fieldName)) { + deserializedProviderRegistrationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceProviderManifestInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceProviderManifestInner.java index f8691db37e77..40c177cd40b0 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceProviderManifestInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceProviderManifestInner.java @@ -9,7 +9,11 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.providerhub.models.CrossTenantTokenValidation; +import com.azure.resourcemanager.providerhub.models.FanoutLinkedNotificationRule; +import com.azure.resourcemanager.providerhub.models.Notification; import com.azure.resourcemanager.providerhub.models.ResourceProviderAuthorization; +import com.azure.resourcemanager.providerhub.models.ResourceProviderAuthorizationRules; import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilities; import com.azure.resourcemanager.providerhub.models.ResourceProviderEndpoint; import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestFeaturesRule; @@ -17,6 +21,7 @@ import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestProviderAuthentication; import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestReRegisterSubscriptionMetadata; import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestRequestHeaderOptions; +import com.azure.resourcemanager.providerhub.models.ResourceProviderService; import com.azure.resourcemanager.providerhub.models.ResourceProviderType; import com.azure.resourcemanager.providerhub.models.ResourceType; import java.io.IOException; @@ -28,75 +33,110 @@ @Fluent public final class ResourceProviderManifestInner implements JsonSerializable { /* - * The providerAuthentication property. + * The provider authentication. */ private ResourceProviderManifestProviderAuthentication providerAuthentication; /* - * The providerAuthorizations property. + * The provider authorizations. */ private List providerAuthorizations; /* - * The namespace property. + * The namespace. */ private String namespace; /* - * The providerVersion property. + * The services. + */ + private List services; + + /* + * The service name. + */ + private String serviceName; + + /* + * The provider version. */ private String providerVersion; /* - * The providerType property. + * The provider type. */ private ResourceProviderType providerType; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; /* - * The featuresRule property. + * The features rule. */ private ResourceProviderManifestFeaturesRule featuresRule; /* - * The requestHeaderOptions property. + * The request header options. */ private ResourceProviderManifestRequestHeaderOptions requestHeaderOptions; /* - * The resourceTypes property. + * The resource types. */ private List resourceTypes; /* - * The management property. + * The resource provider management. */ private ResourceProviderManifestManagement management; /* - * The capabilities property. + * The capabilities. */ private List capabilities; /* - * Anything + * The cross tenant token validation. + */ + private CrossTenantTokenValidation crossTenantTokenValidation; + + /* + * The metadata. */ private Object metadata; /* - * The globalNotificationEndpoints property. + * The global notification endpoints. */ private List globalNotificationEndpoints; /* - * The reRegisterSubscriptionMetadata property. + * The re-register subscription metadata. */ private ResourceProviderManifestReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata; + /* + * Whether tenant linked notification is enabled. + */ + private Boolean enableTenantLinkedNotification; + + /* + * The notifications. + */ + private List notifications; + + /* + * The linked notification rules. + */ + private List linkedNotificationRules; + + /* + * The resource provider authorization rules. + */ + private ResourceProviderAuthorizationRules resourceProviderAuthorizationRules; + /** * Creates an instance of ResourceProviderManifestInner class. */ @@ -104,7 +144,7 @@ public ResourceProviderManifestInner() { } /** - * Get the providerAuthentication property: The providerAuthentication property. + * Get the providerAuthentication property: The provider authentication. * * @return the providerAuthentication value. */ @@ -113,7 +153,7 @@ public ResourceProviderManifestProviderAuthentication providerAuthentication() { } /** - * Set the providerAuthentication property: The providerAuthentication property. + * Set the providerAuthentication property: The provider authentication. * * @param providerAuthentication the providerAuthentication value to set. * @return the ResourceProviderManifestInner object itself. @@ -125,7 +165,7 @@ public ResourceProviderManifestProviderAuthentication providerAuthentication() { } /** - * Get the providerAuthorizations property: The providerAuthorizations property. + * Get the providerAuthorizations property: The provider authorizations. * * @return the providerAuthorizations value. */ @@ -134,7 +174,7 @@ public List providerAuthorizations() { } /** - * Set the providerAuthorizations property: The providerAuthorizations property. + * Set the providerAuthorizations property: The provider authorizations. * * @param providerAuthorizations the providerAuthorizations value to set. * @return the ResourceProviderManifestInner object itself. @@ -146,7 +186,7 @@ public List providerAuthorizations() { } /** - * Get the namespace property: The namespace property. + * Get the namespace property: The namespace. * * @return the namespace value. */ @@ -155,7 +195,7 @@ public String namespace() { } /** - * Set the namespace property: The namespace property. + * Set the namespace property: The namespace. * * @param namespace the namespace value to set. * @return the ResourceProviderManifestInner object itself. @@ -166,7 +206,47 @@ public ResourceProviderManifestInner withNamespace(String namespace) { } /** - * Get the providerVersion property: The providerVersion property. + * Get the services property: The services. + * + * @return the services value. + */ + public List services() { + return this.services; + } + + /** + * Set the services property: The services. + * + * @param services the services value to set. + * @return the ResourceProviderManifestInner object itself. + */ + public ResourceProviderManifestInner withServices(List services) { + this.services = services; + return this; + } + + /** + * Get the serviceName property: The service name. + * + * @return the serviceName value. + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the serviceName property: The service name. + * + * @param serviceName the serviceName value to set. + * @return the ResourceProviderManifestInner object itself. + */ + public ResourceProviderManifestInner withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the providerVersion property: The provider version. * * @return the providerVersion value. */ @@ -175,7 +255,7 @@ public String providerVersion() { } /** - * Set the providerVersion property: The providerVersion property. + * Set the providerVersion property: The provider version. * * @param providerVersion the providerVersion value to set. * @return the ResourceProviderManifestInner object itself. @@ -186,7 +266,7 @@ public ResourceProviderManifestInner withProviderVersion(String providerVersion) } /** - * Get the providerType property: The providerType property. + * Get the providerType property: The provider type. * * @return the providerType value. */ @@ -195,7 +275,7 @@ public ResourceProviderType providerType() { } /** - * Set the providerType property: The providerType property. + * Set the providerType property: The provider type. * * @param providerType the providerType value to set. * @return the ResourceProviderManifestInner object itself. @@ -206,7 +286,7 @@ public ResourceProviderManifestInner withProviderType(ResourceProviderType provi } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -215,7 +295,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the ResourceProviderManifestInner object itself. @@ -226,7 +306,7 @@ public ResourceProviderManifestInner withRequiredFeatures(List requiredF } /** - * Get the featuresRule property: The featuresRule property. + * Get the featuresRule property: The features rule. * * @return the featuresRule value. */ @@ -235,7 +315,7 @@ public ResourceProviderManifestFeaturesRule featuresRule() { } /** - * Set the featuresRule property: The featuresRule property. + * Set the featuresRule property: The features rule. * * @param featuresRule the featuresRule value to set. * @return the ResourceProviderManifestInner object itself. @@ -246,7 +326,7 @@ public ResourceProviderManifestInner withFeaturesRule(ResourceProviderManifestFe } /** - * Get the requestHeaderOptions property: The requestHeaderOptions property. + * Get the requestHeaderOptions property: The request header options. * * @return the requestHeaderOptions value. */ @@ -255,7 +335,7 @@ public ResourceProviderManifestRequestHeaderOptions requestHeaderOptions() { } /** - * Set the requestHeaderOptions property: The requestHeaderOptions property. + * Set the requestHeaderOptions property: The request header options. * * @param requestHeaderOptions the requestHeaderOptions value to set. * @return the ResourceProviderManifestInner object itself. @@ -267,7 +347,7 @@ public ResourceProviderManifestRequestHeaderOptions requestHeaderOptions() { } /** - * Get the resourceTypes property: The resourceTypes property. + * Get the resourceTypes property: The resource types. * * @return the resourceTypes value. */ @@ -276,7 +356,7 @@ public List resourceTypes() { } /** - * Set the resourceTypes property: The resourceTypes property. + * Set the resourceTypes property: The resource types. * * @param resourceTypes the resourceTypes value to set. * @return the ResourceProviderManifestInner object itself. @@ -287,7 +367,7 @@ public ResourceProviderManifestInner withResourceTypes(List resour } /** - * Get the management property: The management property. + * Get the management property: The resource provider management. * * @return the management value. */ @@ -296,7 +376,7 @@ public ResourceProviderManifestManagement management() { } /** - * Set the management property: The management property. + * Set the management property: The resource provider management. * * @param management the management value to set. * @return the ResourceProviderManifestInner object itself. @@ -307,7 +387,7 @@ public ResourceProviderManifestInner withManagement(ResourceProviderManifestMana } /** - * Get the capabilities property: The capabilities property. + * Get the capabilities property: The capabilities. * * @return the capabilities value. */ @@ -316,7 +396,7 @@ public List capabilities() { } /** - * Set the capabilities property: The capabilities property. + * Set the capabilities property: The capabilities. * * @param capabilities the capabilities value to set. * @return the ResourceProviderManifestInner object itself. @@ -327,7 +407,28 @@ public ResourceProviderManifestInner withCapabilities(List globalNotificationEndpoints() { } /** - * Set the globalNotificationEndpoints property: The globalNotificationEndpoints property. + * Set the globalNotificationEndpoints property: The global notification endpoints. * * @param globalNotificationEndpoints the globalNotificationEndpoints value to set. * @return the ResourceProviderManifestInner object itself. @@ -368,7 +469,7 @@ public List globalNotificationEndpoints() { } /** - * Get the reRegisterSubscriptionMetadata property: The reRegisterSubscriptionMetadata property. + * Get the reRegisterSubscriptionMetadata property: The re-register subscription metadata. * * @return the reRegisterSubscriptionMetadata value. */ @@ -377,7 +478,7 @@ public ResourceProviderManifestReRegisterSubscriptionMetadata reRegisterSubscrip } /** - * Set the reRegisterSubscriptionMetadata property: The reRegisterSubscriptionMetadata property. + * Set the reRegisterSubscriptionMetadata property: The re-register subscription metadata. * * @param reRegisterSubscriptionMetadata the reRegisterSubscriptionMetadata value to set. * @return the ResourceProviderManifestInner object itself. @@ -388,6 +489,88 @@ public ResourceProviderManifestInner withReRegisterSubscriptionMetadata( return this; } + /** + * Get the enableTenantLinkedNotification property: Whether tenant linked notification is enabled. + * + * @return the enableTenantLinkedNotification value. + */ + public Boolean enableTenantLinkedNotification() { + return this.enableTenantLinkedNotification; + } + + /** + * Set the enableTenantLinkedNotification property: Whether tenant linked notification is enabled. + * + * @param enableTenantLinkedNotification the enableTenantLinkedNotification value to set. + * @return the ResourceProviderManifestInner object itself. + */ + public ResourceProviderManifestInner withEnableTenantLinkedNotification(Boolean enableTenantLinkedNotification) { + this.enableTenantLinkedNotification = enableTenantLinkedNotification; + return this; + } + + /** + * Get the notifications property: The notifications. + * + * @return the notifications value. + */ + public List notifications() { + return this.notifications; + } + + /** + * Set the notifications property: The notifications. + * + * @param notifications the notifications value to set. + * @return the ResourceProviderManifestInner object itself. + */ + public ResourceProviderManifestInner withNotifications(List notifications) { + this.notifications = notifications; + return this; + } + + /** + * Get the linkedNotificationRules property: The linked notification rules. + * + * @return the linkedNotificationRules value. + */ + public List linkedNotificationRules() { + return this.linkedNotificationRules; + } + + /** + * Set the linkedNotificationRules property: The linked notification rules. + * + * @param linkedNotificationRules the linkedNotificationRules value to set. + * @return the ResourceProviderManifestInner object itself. + */ + public ResourceProviderManifestInner + withLinkedNotificationRules(List linkedNotificationRules) { + this.linkedNotificationRules = linkedNotificationRules; + return this; + } + + /** + * Get the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @return the resourceProviderAuthorizationRules value. + */ + public ResourceProviderAuthorizationRules resourceProviderAuthorizationRules() { + return this.resourceProviderAuthorizationRules; + } + + /** + * Set the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @param resourceProviderAuthorizationRules the resourceProviderAuthorizationRules value to set. + * @return the ResourceProviderManifestInner object itself. + */ + public ResourceProviderManifestInner + withResourceProviderAuthorizationRules(ResourceProviderAuthorizationRules resourceProviderAuthorizationRules) { + this.resourceProviderAuthorizationRules = resourceProviderAuthorizationRules; + return this; + } + /** * Validates the instance. * @@ -400,6 +583,9 @@ public void validate() { if (providerAuthorizations() != null) { providerAuthorizations().forEach(e -> e.validate()); } + if (services() != null) { + services().forEach(e -> e.validate()); + } if (featuresRule() != null) { featuresRule().validate(); } @@ -421,6 +607,15 @@ public void validate() { if (reRegisterSubscriptionMetadata() != null) { reRegisterSubscriptionMetadata().validate(); } + if (notifications() != null) { + notifications().forEach(e -> e.validate()); + } + if (linkedNotificationRules() != null) { + linkedNotificationRules().forEach(e -> e.validate()); + } + if (resourceProviderAuthorizationRules() != null) { + resourceProviderAuthorizationRules().validate(); + } } /** @@ -433,6 +628,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("providerAuthorizations", this.providerAuthorizations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("namespace", this.namespace); + jsonWriter.writeArrayField("services", this.services, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("serviceName", this.serviceName); jsonWriter.writeStringField("providerVersion", this.providerVersion); jsonWriter.writeStringField("providerType", this.providerType == null ? null : this.providerType.toString()); jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, @@ -442,10 +639,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("resourceTypes", this.resourceTypes, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("management", this.management); jsonWriter.writeArrayField("capabilities", this.capabilities, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("crossTenantTokenValidation", + this.crossTenantTokenValidation == null ? null : this.crossTenantTokenValidation.toString()); jsonWriter.writeUntypedField("metadata", this.metadata); jsonWriter.writeArrayField("globalNotificationEndpoints", this.globalNotificationEndpoints, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("reRegisterSubscriptionMetadata", this.reRegisterSubscriptionMetadata); + jsonWriter.writeBooleanField("enableTenantLinkedNotification", this.enableTenantLinkedNotification); + jsonWriter.writeArrayField("notifications", this.notifications, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("linkedNotificationRules", this.linkedNotificationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("resourceProviderAuthorizationRules", this.resourceProviderAuthorizationRules); return jsonWriter.writeEndObject(); } @@ -474,6 +678,12 @@ public static ResourceProviderManifestInner fromJson(JsonReader jsonReader) thro deserializedResourceProviderManifestInner.providerAuthorizations = providerAuthorizations; } else if ("namespace".equals(fieldName)) { deserializedResourceProviderManifestInner.namespace = reader.getString(); + } else if ("services".equals(fieldName)) { + List services + = reader.readArray(reader1 -> ResourceProviderService.fromJson(reader1)); + deserializedResourceProviderManifestInner.services = services; + } else if ("serviceName".equals(fieldName)) { + deserializedResourceProviderManifestInner.serviceName = reader.getString(); } else if ("providerVersion".equals(fieldName)) { deserializedResourceProviderManifestInner.providerVersion = reader.getString(); } else if ("providerType".equals(fieldName)) { @@ -498,6 +708,9 @@ public static ResourceProviderManifestInner fromJson(JsonReader jsonReader) thro List capabilities = reader.readArray(reader1 -> ResourceProviderCapabilities.fromJson(reader1)); deserializedResourceProviderManifestInner.capabilities = capabilities; + } else if ("crossTenantTokenValidation".equals(fieldName)) { + deserializedResourceProviderManifestInner.crossTenantTokenValidation + = CrossTenantTokenValidation.fromString(reader.getString()); } else if ("metadata".equals(fieldName)) { deserializedResourceProviderManifestInner.metadata = reader.readUntyped(); } else if ("globalNotificationEndpoints".equals(fieldName)) { @@ -507,6 +720,19 @@ public static ResourceProviderManifestInner fromJson(JsonReader jsonReader) thro } else if ("reRegisterSubscriptionMetadata".equals(fieldName)) { deserializedResourceProviderManifestInner.reRegisterSubscriptionMetadata = ResourceProviderManifestReRegisterSubscriptionMetadata.fromJson(reader); + } else if ("enableTenantLinkedNotification".equals(fieldName)) { + deserializedResourceProviderManifestInner.enableTenantLinkedNotification + = reader.getNullable(JsonReader::getBoolean); + } else if ("notifications".equals(fieldName)) { + List notifications = reader.readArray(reader1 -> Notification.fromJson(reader1)); + deserializedResourceProviderManifestInner.notifications = notifications; + } else if ("linkedNotificationRules".equals(fieldName)) { + List linkedNotificationRules + = reader.readArray(reader1 -> FanoutLinkedNotificationRule.fromJson(reader1)); + deserializedResourceProviderManifestInner.linkedNotificationRules = linkedNotificationRules; + } else if ("resourceProviderAuthorizationRules".equals(fieldName)) { + deserializedResourceProviderManifestInner.resourceProviderAuthorizationRules + = ResourceProviderAuthorizationRules.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceTypeRegistrationInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceTypeRegistrationInner.java index 05e7964db36f..3317f2eb6df0 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceTypeRegistrationInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/ResourceTypeRegistrationInner.java @@ -6,9 +6,11 @@ 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.providerhub.models.ResourceTypeRegistrationKind; import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationProperties; import java.io.IOException; @@ -22,6 +24,17 @@ public final class ResourceTypeRegistrationInner extends ProxyResource { */ private ResourceTypeRegistrationProperties properties; + /* + * Resource type registration kind. This Metadata is also used by portal/tooling/etc to render different UX + * experiences for resources of the same type. + */ + private ResourceTypeRegistrationKind kind; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -63,6 +76,37 @@ public ResourceTypeRegistrationInner withProperties(ResourceTypeRegistrationProp return this; } + /** + * Get the kind property: Resource type registration kind. This Metadata is also used by portal/tooling/etc to + * render different UX experiences for resources of the same type. + * + * @return the kind value. + */ + public ResourceTypeRegistrationKind kind() { + return this.kind; + } + + /** + * Set the kind property: Resource type registration kind. This Metadata is also used by portal/tooling/etc to + * render different UX experiences for resources of the same type. + * + * @param kind the kind value to set. + * @return the ResourceTypeRegistrationInner object itself. + */ + public ResourceTypeRegistrationInner withKind(ResourceTypeRegistrationKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -111,6 +155,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); return jsonWriter.writeEndObject(); } @@ -140,6 +185,11 @@ public static ResourceTypeRegistrationInner fromJson(JsonReader jsonReader) thro } else if ("properties".equals(fieldName)) { deserializedResourceTypeRegistrationInner.properties = ResourceTypeRegistrationProperties.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedResourceTypeRegistrationInner.kind + = ResourceTypeRegistrationKind.fromString(reader.getString()); + } else if ("systemData".equals(fieldName)) { + deserializedResourceTypeRegistrationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/SkuResourceInner.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/SkuResourceInner.java index 5fe60c9f002e..aac8ece1cc40 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/SkuResourceInner.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/SkuResourceInner.java @@ -6,6 +6,7 @@ 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; @@ -22,6 +23,11 @@ public final class SkuResourceInner extends ProxyResource { */ private SkuResourceProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -63,6 +69,15 @@ public SkuResourceInner withProperties(SkuResourceProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -138,6 +153,8 @@ public static SkuResourceInner fromJson(JsonReader jsonReader) throws IOExceptio deserializedSkuResourceInner.type = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedSkuResourceInner.properties = SkuResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSkuResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/package-info.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/package-info.java index 367e0b727d7f..10f993c7a54a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/package-info.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/models/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the inner data models for ProviderHub. - * Microsoft ProviderHub. + * Provider Hub. */ package com.azure.resourcemanager.providerhub.fluent.models; diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/package-info.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/package-info.java index ed0d7b9aebeb..b04c47191761 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/package-info.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/fluent/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the service clients for ProviderHub. - * Microsoft ProviderHub. + * Provider Hub. */ package com.azure.resourcemanager.providerhub.fluent; diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationImpl.java new file mode 100644 index 000000000000..5858b04c0cd7 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationImpl.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.providerhub.fluent.models.AuthorizedApplicationInner; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplication; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplicationProperties; +import java.util.UUID; + +public final class AuthorizedApplicationImpl + implements AuthorizedApplication, AuthorizedApplication.Definition, AuthorizedApplication.Update { + private AuthorizedApplicationInner innerObject; + + private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public AuthorizedApplicationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AuthorizedApplicationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { + return this.serviceManager; + } + + private String providerNamespace; + + private UUID applicationId; + + public AuthorizedApplicationImpl withExistingProviderRegistration(String providerNamespace) { + this.providerNamespace = providerNamespace; + return this; + } + + public AuthorizedApplication create() { + this.innerObject = serviceManager.serviceClient() + .getAuthorizedApplications() + .createOrUpdate(providerNamespace, applicationId, this.innerModel(), Context.NONE); + return this; + } + + public AuthorizedApplication create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAuthorizedApplications() + .createOrUpdate(providerNamespace, applicationId, this.innerModel(), context); + return this; + } + + AuthorizedApplicationImpl(UUID name, com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerObject = new AuthorizedApplicationInner(); + this.serviceManager = serviceManager; + this.applicationId = name; + } + + public AuthorizedApplicationImpl update() { + return this; + } + + public AuthorizedApplication apply() { + this.innerObject = serviceManager.serviceClient() + .getAuthorizedApplications() + .createOrUpdate(providerNamespace, applicationId, this.innerModel(), Context.NONE); + return this; + } + + public AuthorizedApplication apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAuthorizedApplications() + .createOrUpdate(providerNamespace, applicationId, this.innerModel(), context); + return this; + } + + AuthorizedApplicationImpl(AuthorizedApplicationInner innerObject, + com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.providerNamespace = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "providerRegistrations"); + this.applicationId + = UUID.fromString(ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "authorizedApplications")); + } + + public AuthorizedApplication refresh() { + this.innerObject = serviceManager.serviceClient() + .getAuthorizedApplications() + .getWithResponse(providerNamespace, applicationId, Context.NONE) + .getValue(); + return this; + } + + public AuthorizedApplication refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAuthorizedApplications() + .getWithResponse(providerNamespace, applicationId, context) + .getValue(); + return this; + } + + public AuthorizedApplicationImpl withProperties(AuthorizedApplicationProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsClientImpl.java new file mode 100644 index 000000000000..b78dc390ed37 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsClientImpl.java @@ -0,0 +1,766 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.providerhub.fluent.AuthorizedApplicationsClient; +import com.azure.resourcemanager.providerhub.fluent.models.AuthorizedApplicationInner; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplicationArrayResponseWithContinuation; +import java.nio.ByteBuffer; +import java.util.UUID; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AuthorizedApplicationsClient. + */ +public final class AuthorizedApplicationsClientImpl implements AuthorizedApplicationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AuthorizedApplicationsService service; + + /** + * The service client containing this operation class. + */ + private final ProviderHubImpl client; + + /** + * Initializes an instance of AuthorizedApplicationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AuthorizedApplicationsClientImpl(ProviderHubImpl client) { + this.service = RestProxy.create(AuthorizedApplicationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ProviderHubAuthorizedApplications to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ProviderHubAuthorize") + public interface AuthorizedApplicationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @QueryParam("api-version") String apiVersion, + @PathParam("applicationId") UUID applicationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @PathParam("applicationId") UUID applicationId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AuthorizedApplicationInner properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @QueryParam("api-version") String apiVersion, + @PathParam("applicationId") UUID applicationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String providerNamespace, + UUID applicationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (applicationId == null) { + return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, this.client.getApiVersion(), applicationId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String providerNamespace, + UUID applicationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (applicationId == null) { + return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + this.client.getApiVersion(), applicationId, accept, context); + } + + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String providerNamespace, UUID applicationId) { + return getWithResponseAsync(providerNamespace, applicationId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String providerNamespace, UUID applicationId, + Context context) { + return getWithResponseAsync(providerNamespace, applicationId, context).block(); + } + + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizedApplicationInner get(String providerNamespace, UUID applicationId) { + return getWithResponse(providerNamespace, applicationId, Context.NONE).getValue(); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String providerNamespace, + UUID applicationId, AuthorizedApplicationInner properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (applicationId == null) { + return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, applicationId, this.client.getApiVersion(), properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String providerNamespace, + UUID applicationId, AuthorizedApplicationInner properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (applicationId == null) { + return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + applicationId, this.client.getApiVersion(), properties, accept, context); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AuthorizedApplicationInner> + beginCreateOrUpdateAsync(String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties) { + Mono>> mono + = createOrUpdateWithResponseAsync(providerNamespace, applicationId, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AuthorizedApplicationInner.class, AuthorizedApplicationInner.class, + this.client.getContext()); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AuthorizedApplicationInner> beginCreateOrUpdateAsync( + String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(providerNamespace, applicationId, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AuthorizedApplicationInner.class, AuthorizedApplicationInner.class, context); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AuthorizedApplicationInner> + beginCreateOrUpdate(String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties) { + return this.beginCreateOrUpdateAsync(providerNamespace, applicationId, properties).getSyncPoller(); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AuthorizedApplicationInner> beginCreateOrUpdate( + String providerNamespace, UUID applicationId, AuthorizedApplicationInner properties, Context context) { + return this.beginCreateOrUpdateAsync(providerNamespace, applicationId, properties, context).getSyncPoller(); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String providerNamespace, UUID applicationId, + AuthorizedApplicationInner properties) { + return beginCreateOrUpdateAsync(providerNamespace, applicationId, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String providerNamespace, UUID applicationId, + AuthorizedApplicationInner properties, Context context) { + return beginCreateOrUpdateAsync(providerNamespace, applicationId, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizedApplicationInner createOrUpdate(String providerNamespace, UUID applicationId, + AuthorizedApplicationInner properties) { + return createOrUpdateAsync(providerNamespace, applicationId, properties).block(); + } + + /** + * Creates or updates the authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param properties The authorized application properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AuthorizedApplicationInner createOrUpdate(String providerNamespace, UUID applicationId, + AuthorizedApplicationInner properties, Context context) { + return createOrUpdateAsync(providerNamespace, applicationId, properties, context).block(); + } + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String providerNamespace, UUID applicationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (applicationId == null) { + return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, this.client.getApiVersion(), applicationId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String providerNamespace, UUID applicationId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (applicationId == null) { + return Mono.error(new IllegalArgumentException("Parameter applicationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + this.client.getApiVersion(), applicationId, accept, context); + } + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String providerNamespace, UUID applicationId) { + return deleteWithResponseAsync(providerNamespace, applicationId).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String providerNamespace, UUID applicationId, Context context) { + return deleteWithResponseAsync(providerNamespace, applicationId, context).block(); + } + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String providerNamespace, UUID applicationId) { + deleteWithResponse(providerNamespace, applicationId, Context.NONE); + } + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String providerNamespace) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String providerNamespace, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String providerNamespace) { + return new PagedFlux<>(() -> listSinglePageAsync(providerNamespace), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String providerNamespace, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(providerNamespace, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String providerNamespace) { + return new PagedIterable<>(listAsync(providerNamespace)); + } + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String providerNamespace, Context context) { + return new PagedIterable<>(listAsync(providerNamespace, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsImpl.java new file mode 100644 index 000000000000..b2c4a47732a5 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/AuthorizedApplicationsImpl.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.providerhub.fluent.AuthorizedApplicationsClient; +import com.azure.resourcemanager.providerhub.fluent.models.AuthorizedApplicationInner; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplication; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplications; +import java.util.UUID; + +public final class AuthorizedApplicationsImpl implements AuthorizedApplications { + private static final ClientLogger LOGGER = new ClientLogger(AuthorizedApplicationsImpl.class); + + private final AuthorizedApplicationsClient innerClient; + + private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; + + public AuthorizedApplicationsImpl(AuthorizedApplicationsClient innerClient, + com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String providerNamespace, UUID applicationId, + Context context) { + Response inner + = this.serviceClient().getWithResponse(providerNamespace, applicationId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AuthorizedApplicationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AuthorizedApplication get(String providerNamespace, UUID applicationId) { + AuthorizedApplicationInner inner = this.serviceClient().get(providerNamespace, applicationId); + if (inner != null) { + return new AuthorizedApplicationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String providerNamespace, UUID applicationId, Context context) { + return this.serviceClient().deleteWithResponse(providerNamespace, applicationId, context); + } + + public void delete(String providerNamespace, UUID applicationId) { + this.serviceClient().delete(providerNamespace, applicationId); + } + + public PagedIterable list(String providerNamespace) { + PagedIterable inner = this.serviceClient().list(providerNamespace); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthorizedApplicationImpl(inner1, this.manager())); + } + + public PagedIterable list(String providerNamespace, Context context) { + PagedIterable inner = this.serviceClient().list(providerNamespace, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthorizedApplicationImpl(inner1, this.manager())); + } + + public AuthorizedApplication getById(String id) { + String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); + if (providerNamespace == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'providerRegistrations'.", id))); + } + String applicationIdLocal = ResourceManagerUtils.getValueFromIdByName(id, "authorizedApplications"); + if (applicationIdLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'authorizedApplications'.", id))); + } + UUID applicationId = UUID.fromString(applicationIdLocal); + return this.getWithResponse(providerNamespace, applicationId, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); + if (providerNamespace == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'providerRegistrations'.", id))); + } + String applicationIdLocal = ResourceManagerUtils.getValueFromIdByName(id, "authorizedApplications"); + if (applicationIdLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'authorizedApplications'.", id))); + } + UUID applicationId = UUID.fromString(applicationIdLocal); + return this.getWithResponse(providerNamespace, applicationId, context); + } + + public void deleteById(String id) { + String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); + if (providerNamespace == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'providerRegistrations'.", id))); + } + String applicationIdLocal = ResourceManagerUtils.getValueFromIdByName(id, "authorizedApplications"); + if (applicationIdLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'authorizedApplications'.", id))); + } + UUID applicationId = UUID.fromString(applicationIdLocal); + this.deleteWithResponse(providerNamespace, applicationId, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); + if (providerNamespace == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'providerRegistrations'.", id))); + } + String applicationIdLocal = ResourceManagerUtils.getValueFromIdByName(id, "authorizedApplications"); + if (applicationIdLocal == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'authorizedApplications'.", id))); + } + UUID applicationId = UUID.fromString(applicationIdLocal); + return this.deleteWithResponse(providerNamespace, applicationId, context); + } + + private AuthorizedApplicationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { + return this.serviceManager; + } + + public AuthorizedApplicationImpl define(UUID name) { + return new AuthorizedApplicationImpl(name, this.manager()); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutImpl.java index f8d0c10fba1a..18d84404e341 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutImpl.java @@ -4,6 +4,8 @@ package com.azure.resourcemanager.providerhub.implementation; +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.CustomRolloutInner; import com.azure.resourcemanager.providerhub.models.CustomRollout; @@ -30,6 +32,10 @@ public CustomRolloutProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public CustomRolloutInner innerModel() { return this.innerObject; } @@ -50,16 +56,14 @@ public CustomRolloutImpl withExistingProviderRegistration(String providerNamespa public CustomRollout create() { this.innerObject = serviceManager.serviceClient() .getCustomRollouts() - .createOrUpdateWithResponse(providerNamespace, rolloutName, this.innerModel(), Context.NONE) - .getValue(); + .createOrUpdate(providerNamespace, rolloutName, this.innerModel(), Context.NONE); return this; } public CustomRollout create(Context context) { this.innerObject = serviceManager.serviceClient() .getCustomRollouts() - .createOrUpdateWithResponse(providerNamespace, rolloutName, this.innerModel(), context) - .getValue(); + .createOrUpdate(providerNamespace, rolloutName, this.innerModel(), context); return this; } @@ -76,16 +80,14 @@ public CustomRolloutImpl update() { public CustomRollout apply() { this.innerObject = serviceManager.serviceClient() .getCustomRollouts() - .createOrUpdateWithResponse(providerNamespace, rolloutName, this.innerModel(), Context.NONE) - .getValue(); + .createOrUpdate(providerNamespace, rolloutName, this.innerModel(), Context.NONE); return this; } public CustomRollout apply(Context context) { this.innerObject = serviceManager.serviceClient() .getCustomRollouts() - .createOrUpdateWithResponse(providerNamespace, rolloutName, this.innerModel(), context) - .getValue(); + .createOrUpdate(providerNamespace, rolloutName, this.innerModel(), context); return this; } @@ -113,6 +115,14 @@ public CustomRollout refresh(Context context) { return this; } + public Response stopWithResponse(Context context) { + return serviceManager.customRollouts().stopWithResponse(providerNamespace, rolloutName, context); + } + + public void stop() { + serviceManager.customRollouts().stop(providerNamespace, rolloutName); + } + public CustomRolloutImpl withProperties(CustomRolloutProperties properties) { this.innerModel().withProperties(properties); return this; diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsClientImpl.java index 37f93b122172..76b93d53256c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsClientImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsClientImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.providerhub.implementation; import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; @@ -12,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -25,11 +27,16 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.providerhub.fluent.CustomRolloutsClient; import com.azure.resourcemanager.providerhub.fluent.models.CustomRolloutInner; import com.azure.resourcemanager.providerhub.models.CustomRolloutArrayResponseWithContinuation; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -73,11 +80,20 @@ Mono> get(@HostParam("$host") String endpoint, @PathParam("providerNamespace") String providerNamespace, @PathParam("rolloutName") String rolloutName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @PathParam("rolloutName") String rolloutName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("providerNamespace") String providerNamespace, @PathParam("rolloutName") String rolloutName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CustomRolloutInner properties, @@ -92,6 +108,15 @@ Mono> listByProviderRegistr @PathParam("providerNamespace") String providerNamespace, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}/stop") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> stop(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @PathParam("rolloutName") String rolloutName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -216,6 +241,120 @@ public CustomRolloutInner get(String providerNamespace, String rolloutName) { return getWithResponse(providerNamespace, rolloutName, Context.NONE).getValue(); } + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String providerNamespace, String rolloutName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (rolloutName == null) { + return Mono.error(new IllegalArgumentException("Parameter rolloutName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, rolloutName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String providerNamespace, String rolloutName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (rolloutName == null) { + return Mono.error(new IllegalArgumentException("Parameter rolloutName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + rolloutName, this.client.getApiVersion(), accept, context); + } + + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String providerNamespace, String rolloutName) { + return deleteWithResponseAsync(providerNamespace, rolloutName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String providerNamespace, String rolloutName, Context context) { + return deleteWithResponseAsync(providerNamespace, rolloutName, context).block(); + } + + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String providerNamespace, String rolloutName) { + deleteWithResponse(providerNamespace, rolloutName, Context.NONE); + } + /** * Creates or updates the rollout details. * @@ -225,10 +364,10 @@ public CustomRolloutInner get(String providerNamespace, String rolloutName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rollout details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String providerNamespace, + private Mono>> createOrUpdateWithResponseAsync(String providerNamespace, String rolloutName, CustomRolloutInner properties) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -267,10 +406,10 @@ private Mono> createOrUpdateWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rollout details along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String providerNamespace, + private Mono>> createOrUpdateWithResponseAsync(String providerNamespace, String rolloutName, CustomRolloutInner properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -307,13 +446,90 @@ private Mono> createOrUpdateWithResponseAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rollout details on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CustomRolloutInner> + beginCreateOrUpdateAsync(String providerNamespace, String rolloutName, CustomRolloutInner properties) { + Mono>> mono + = createOrUpdateWithResponseAsync(providerNamespace, rolloutName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CustomRolloutInner.class, CustomRolloutInner.class, this.client.getContext()); + } + + /** + * Creates or updates the rollout details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param properties The custom rollout properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CustomRolloutInner> beginCreateOrUpdateAsync( + String providerNamespace, String rolloutName, CustomRolloutInner properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(providerNamespace, rolloutName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CustomRolloutInner.class, CustomRolloutInner.class, context); + } + + /** + * Creates or updates the rollout details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param properties The custom rollout properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CustomRolloutInner> beginCreateOrUpdate(String providerNamespace, + String rolloutName, CustomRolloutInner properties) { + return this.beginCreateOrUpdateAsync(providerNamespace, rolloutName, properties).getSyncPoller(); + } + + /** + * Creates or updates the rollout details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param properties The custom rollout properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CustomRolloutInner> beginCreateOrUpdate(String providerNamespace, + String rolloutName, CustomRolloutInner properties, Context context) { + return this.beginCreateOrUpdateAsync(providerNamespace, rolloutName, properties, context).getSyncPoller(); + } + + /** + * Creates or updates the rollout details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param properties The custom rollout properties supplied to the CreateOrUpdate operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String providerNamespace, String rolloutName, CustomRolloutInner properties) { - return createOrUpdateWithResponseAsync(providerNamespace, rolloutName, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginCreateOrUpdateAsync(providerNamespace, rolloutName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -326,12 +542,13 @@ private Mono createOrUpdateAsync(String providerNamespace, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rollout details along with {@link Response}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String providerNamespace, String rolloutName, + private Mono createOrUpdateAsync(String providerNamespace, String rolloutName, CustomRolloutInner properties, Context context) { - return createOrUpdateWithResponseAsync(providerNamespace, rolloutName, properties, context).block(); + return beginCreateOrUpdateAsync(providerNamespace, rolloutName, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -343,12 +560,30 @@ public Response createOrUpdateWithResponse(String providerNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return rollout details. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CustomRolloutInner createOrUpdate(String providerNamespace, String rolloutName, CustomRolloutInner properties) { - return createOrUpdateWithResponse(providerNamespace, rolloutName, properties, Context.NONE).getValue(); + return createOrUpdateAsync(providerNamespace, rolloutName, properties).block(); + } + + /** + * Creates or updates the rollout details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param properties The custom rollout properties supplied to the CreateOrUpdate operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CustomRolloutInner createOrUpdate(String providerNamespace, String rolloutName, + CustomRolloutInner properties, Context context) { + return createOrUpdateAsync(providerNamespace, rolloutName, properties, context).block(); } /** @@ -480,6 +715,119 @@ public PagedIterable listByProviderRegistration(String provi return new PagedIterable<>(listByProviderRegistrationAsync(providerNamespace, context)); } + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWithResponseAsync(String providerNamespace, String rolloutName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (rolloutName == null) { + return Mono.error(new IllegalArgumentException("Parameter rolloutName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, rolloutName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWithResponseAsync(String providerNamespace, String rolloutName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (rolloutName == null) { + return Mono.error(new IllegalArgumentException("Parameter rolloutName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, rolloutName, + this.client.getApiVersion(), accept, context); + } + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String providerNamespace, String rolloutName) { + return stopWithResponseAsync(providerNamespace, rolloutName).flatMap(ignored -> Mono.empty()); + } + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopWithResponse(String providerNamespace, String rolloutName, Context context) { + return stopWithResponseAsync(providerNamespace, rolloutName, context).block(); + } + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String providerNamespace, String rolloutName) { + stopWithResponse(providerNamespace, rolloutName, Context.NONE); + } + /** * Get the next page of items. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsImpl.java index cfecdb5e3625..66168527fe3a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/CustomRolloutsImpl.java @@ -47,6 +47,15 @@ public CustomRollout get(String providerNamespace, String rolloutName) { } } + public Response deleteByResourceGroupWithResponse(String providerNamespace, String rolloutName, + Context context) { + return this.serviceClient().deleteWithResponse(providerNamespace, rolloutName, context); + } + + public void deleteByResourceGroup(String providerNamespace, String rolloutName) { + this.serviceClient().delete(providerNamespace, rolloutName); + } + public PagedIterable listByProviderRegistration(String providerNamespace) { PagedIterable inner = this.serviceClient().listByProviderRegistration(providerNamespace); return ResourceManagerUtils.mapPage(inner, inner1 -> new CustomRolloutImpl(inner1, this.manager())); @@ -58,6 +67,14 @@ public PagedIterable listByProviderRegistration(String providerNa return ResourceManagerUtils.mapPage(inner, inner1 -> new CustomRolloutImpl(inner1, this.manager())); } + public Response stopWithResponse(String providerNamespace, String rolloutName, Context context) { + return this.serviceClient().stopWithResponse(providerNamespace, rolloutName, context); + } + + public void stop(String providerNamespace, String rolloutName) { + this.serviceClient().stop(providerNamespace, rolloutName); + } + public CustomRollout getById(String id) { String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); if (providerNamespace == null) { @@ -86,6 +103,34 @@ public Response getByIdWithResponse(String id, Context context) { return this.getWithResponse(providerNamespace, rolloutName, context); } + public void deleteById(String id) { + String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); + if (providerNamespace == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'providerRegistrations'.", id))); + } + String rolloutName = ResourceManagerUtils.getValueFromIdByName(id, "customRollouts"); + if (rolloutName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customRollouts'.", id))); + } + this.deleteByResourceGroupWithResponse(providerNamespace, rolloutName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); + if (providerNamespace == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'providerRegistrations'.", id))); + } + String rolloutName = ResourceManagerUtils.getValueFromIdByName(id, "customRollouts"); + if (rolloutName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customRollouts'.", id))); + } + return this.deleteByResourceGroupWithResponse(providerNamespace, rolloutName, context); + } + private CustomRolloutsClient serviceClient() { return this.innerClient; } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutImpl.java index 93662a4bd23b..ae50c191ba88 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.providerhub.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.DefaultRolloutInner; import com.azure.resourcemanager.providerhub.models.DefaultRollout; @@ -31,6 +32,10 @@ public DefaultRolloutProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public DefaultRolloutInner innerModel() { return this.innerObject; } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutsClientImpl.java index 96f39e019672..b7dd0ade7a47 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutsClientImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/DefaultRolloutsClientImpl.java @@ -365,7 +365,7 @@ public void delete(String providerNamespace, String rolloutName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String providerNamespace, @@ -407,7 +407,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String providerNamespace, @@ -447,7 +447,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of default rollout definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DefaultRolloutInner> @@ -468,7 +468,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of default rollout definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DefaultRolloutInner> beginCreateOrUpdateAsync( @@ -489,7 +489,7 @@ private PollerFlux, DefaultRolloutInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of default rollout definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DefaultRolloutInner> @@ -507,7 +507,7 @@ private PollerFlux, DefaultRolloutInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of default rollout definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DefaultRolloutInner> beginCreateOrUpdate( @@ -524,7 +524,7 @@ public SyncPoller, DefaultRolloutInner> beginCre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String providerNamespace, String rolloutName, @@ -543,7 +543,7 @@ private Mono createOrUpdateAsync(String providerNamespace, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String providerNamespace, String rolloutName, @@ -561,7 +561,7 @@ private Mono createOrUpdateAsync(String providerNamespace, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DefaultRolloutInner createOrUpdate(String providerNamespace, String rolloutName, @@ -579,7 +579,7 @@ public DefaultRolloutInner createOrUpdate(String providerNamespace, String rollo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return default rollout definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DefaultRolloutInner createOrUpdate(String providerNamespace, String rolloutName, diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesClientImpl.java new file mode 100644 index 000000000000..396c6402a408 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesClientImpl.java @@ -0,0 +1,590 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.providerhub.fluent.NewRegionFrontloadReleasesClient; +import com.azure.resourcemanager.providerhub.fluent.models.DefaultRolloutInner; +import com.azure.resourcemanager.providerhub.fluent.models.ResourceProviderManifestInner; +import com.azure.resourcemanager.providerhub.models.FrontloadPayload; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NewRegionFrontloadReleasesClient. + */ +public final class NewRegionFrontloadReleasesClientImpl implements NewRegionFrontloadReleasesClient { + /** + * The proxy service used to perform REST calls. + */ + private final NewRegionFrontloadReleasesService service; + + /** + * The service client containing this operation class. + */ + private final ProviderHubImpl client; + + /** + * Initializes an instance of NewRegionFrontloadReleasesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NewRegionFrontloadReleasesClientImpl(ProviderHubImpl client) { + this.service = RestProxy.create(NewRegionFrontloadReleasesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ProviderHubNewRegionFrontloadReleases to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ProviderHubNewRegion") + public interface NewRegionFrontloadReleasesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/generateNewRegionFrontloadManifest") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateManifest(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FrontloadPayload properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @PathParam("releaseName") String releaseName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") FrontloadPayload properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @PathParam("releaseName") String releaseName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}/stop") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> stop(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, @PathParam("releaseName") String releaseName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateManifestWithResponseAsync(String providerNamespace, + FrontloadPayload properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.generateManifest(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, this.client.getApiVersion(), properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateManifestWithResponseAsync(String providerNamespace, + FrontloadPayload properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.generateManifest(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + this.client.getApiVersion(), properties, accept, context); + } + + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateManifestAsync(String providerNamespace, + FrontloadPayload properties) { + return generateManifestWithResponseAsync(providerNamespace, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateManifestWithResponse(String providerNamespace, + FrontloadPayload properties, Context context) { + return generateManifestWithResponseAsync(providerNamespace, properties, context).block(); + } + + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceProviderManifestInner generateManifest(String providerNamespace, FrontloadPayload properties) { + return generateManifestWithResponse(providerNamespace, properties, Context.NONE).getValue(); + } + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String providerNamespace, + String releaseName, FrontloadPayload properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (releaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter releaseName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, releaseName, this.client.getApiVersion(), properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String providerNamespace, + String releaseName, FrontloadPayload properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (releaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter releaseName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + releaseName, this.client.getApiVersion(), properties, accept, context); + } + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String providerNamespace, String releaseName, + FrontloadPayload properties) { + return createOrUpdateWithResponseAsync(providerNamespace, releaseName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String providerNamespace, String releaseName, + FrontloadPayload properties, Context context) { + return createOrUpdateWithResponseAsync(providerNamespace, releaseName, properties, context).block(); + } + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DefaultRolloutInner createOrUpdate(String providerNamespace, String releaseName, + FrontloadPayload properties) { + return createOrUpdateWithResponse(providerNamespace, releaseName, properties, Context.NONE).getValue(); + } + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String providerNamespace, String releaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (releaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter releaseName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, releaseName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String providerNamespace, String releaseName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (releaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter releaseName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, releaseName, + this.client.getApiVersion(), accept, context); + } + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String providerNamespace, String releaseName) { + return getWithResponseAsync(providerNamespace, releaseName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String providerNamespace, String releaseName, + Context context) { + return getWithResponseAsync(providerNamespace, releaseName, context).block(); + } + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DefaultRolloutInner get(String providerNamespace, String releaseName) { + return getWithResponse(providerNamespace, releaseName, Context.NONE).getValue(); + } + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWithResponseAsync(String providerNamespace, String releaseName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (releaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter releaseName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, releaseName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWithResponseAsync(String providerNamespace, String releaseName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (releaseName == null) { + return Mono.error(new IllegalArgumentException("Parameter releaseName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, releaseName, + this.client.getApiVersion(), accept, context); + } + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String providerNamespace, String releaseName) { + return stopWithResponseAsync(providerNamespace, releaseName).flatMap(ignored -> Mono.empty()); + } + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopWithResponse(String providerNamespace, String releaseName, Context context) { + return stopWithResponseAsync(providerNamespace, releaseName, context).block(); + } + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String providerNamespace, String releaseName) { + stopWithResponse(providerNamespace, releaseName, Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesImpl.java new file mode 100644 index 000000000000..1f8d42763496 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NewRegionFrontloadReleasesImpl.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.providerhub.fluent.NewRegionFrontloadReleasesClient; +import com.azure.resourcemanager.providerhub.fluent.models.DefaultRolloutInner; +import com.azure.resourcemanager.providerhub.fluent.models.ResourceProviderManifestInner; +import com.azure.resourcemanager.providerhub.models.DefaultRollout; +import com.azure.resourcemanager.providerhub.models.FrontloadPayload; +import com.azure.resourcemanager.providerhub.models.NewRegionFrontloadReleases; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifest; + +public final class NewRegionFrontloadReleasesImpl implements NewRegionFrontloadReleases { + private static final ClientLogger LOGGER = new ClientLogger(NewRegionFrontloadReleasesImpl.class); + + private final NewRegionFrontloadReleasesClient innerClient; + + private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; + + public NewRegionFrontloadReleasesImpl(NewRegionFrontloadReleasesClient innerClient, + com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response generateManifestWithResponse(String providerNamespace, + FrontloadPayload properties, Context context) { + Response inner + = this.serviceClient().generateManifestWithResponse(providerNamespace, properties, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ResourceProviderManifestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ResourceProviderManifest generateManifest(String providerNamespace, FrontloadPayload properties) { + ResourceProviderManifestInner inner = this.serviceClient().generateManifest(providerNamespace, properties); + if (inner != null) { + return new ResourceProviderManifestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse(String providerNamespace, String releaseName, + FrontloadPayload properties, Context context) { + Response inner + = this.serviceClient().createOrUpdateWithResponse(providerNamespace, releaseName, properties, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DefaultRolloutImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DefaultRollout createOrUpdate(String providerNamespace, String releaseName, FrontloadPayload properties) { + DefaultRolloutInner inner = this.serviceClient().createOrUpdate(providerNamespace, releaseName, properties); + if (inner != null) { + return new DefaultRolloutImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String providerNamespace, String releaseName, Context context) { + Response inner + = this.serviceClient().getWithResponse(providerNamespace, releaseName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DefaultRolloutImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DefaultRollout get(String providerNamespace, String releaseName) { + DefaultRolloutInner inner = this.serviceClient().get(providerNamespace, releaseName); + if (inner != null) { + return new DefaultRolloutImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response stopWithResponse(String providerNamespace, String releaseName, Context context) { + return this.serviceClient().stopWithResponse(providerNamespace, releaseName, context); + } + + public void stop(String providerNamespace, String releaseName) { + this.serviceClient().stop(providerNamespace, releaseName); + } + + private NewRegionFrontloadReleasesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationImpl.java index 9b923bade970..e92059f61b6b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.providerhub.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.NotificationRegistrationInner; import com.azure.resourcemanager.providerhub.models.NotificationRegistration; @@ -31,6 +32,10 @@ public NotificationRegistrationProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public NotificationRegistrationInner innerModel() { return this.innerObject; } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationsClientImpl.java index 3f46089f9a48..82e1b6677a23 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationsClientImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/NotificationRegistrationsClientImpl.java @@ -247,8 +247,7 @@ public NotificationRegistrationInner get(String providerNamespace, String notifi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the notification registration definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync(String providerNamespace, @@ -292,8 +291,7 @@ private Mono> createOrUpdateWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the notification registration definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync(String providerNamespace, @@ -334,7 +332,7 @@ private Mono> createOrUpdateWithResponse * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the notification registration definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String providerNamespace, @@ -353,7 +351,7 @@ private Mono createOrUpdateAsync(String providerN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the notification registration definition along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String providerNamespace, @@ -371,7 +369,7 @@ public Response createOrUpdateWithResponse(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the notification registration definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public NotificationRegistrationInner createOrUpdate(String providerNamespace, String notificationRegistrationName, diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsClientImpl.java index db6f5744c3fd..2bf61904988f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsClientImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsClientImpl.java @@ -29,10 +29,9 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.providerhub.fluent.OperationsClient; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsContentInner; import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; import com.azure.resourcemanager.providerhub.models.OperationsDefinitionArrayResponseWithContinuation; -import com.azure.resourcemanager.providerhub.models.OperationsPutContent; import java.util.List; import reactor.core.publisher.Mono; @@ -88,10 +87,10 @@ Mono>> listByProviderRegistration(@Host @Put("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/operations/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("providerNamespace") String providerNamespace, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OperationsPutContent operationsPutContent, + @BodyParam("application/json") OperationsPutContentInner operationsPutContent, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -327,8 +326,8 @@ public List listByProviderRegistration(String provide * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String providerNamespace, - OperationsPutContent operationsPutContent) { + private Mono> createOrUpdateWithResponseAsync(String providerNamespace, + OperationsPutContentInner operationsPutContent) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -366,8 +365,8 @@ private Mono> createOrUpdateWithResponseAsync(S * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String providerNamespace, - OperationsPutContent operationsPutContent, Context context) { + private Mono> createOrUpdateWithResponseAsync(String providerNamespace, + OperationsPutContentInner operationsPutContent, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -403,8 +402,8 @@ private Mono> createOrUpdateWithResponseAsync(S * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String providerNamespace, - OperationsPutContent operationsPutContent) { + private Mono createOrUpdateAsync(String providerNamespace, + OperationsPutContentInner operationsPutContent) { return createOrUpdateWithResponseAsync(providerNamespace, operationsPutContent) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -421,8 +420,8 @@ private Mono createOrUpdateAsync(String providerNamespac * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String providerNamespace, - OperationsPutContent operationsPutContent, Context context) { + public Response createOrUpdateWithResponse(String providerNamespace, + OperationsPutContentInner operationsPutContent, Context context) { return createOrUpdateWithResponseAsync(providerNamespace, operationsPutContent, context).block(); } @@ -437,7 +436,8 @@ public Response createOrUpdateWithResponse(String provid * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationsContentInner createOrUpdate(String providerNamespace, OperationsPutContent operationsPutContent) { + public OperationsPutContentInner createOrUpdate(String providerNamespace, + OperationsPutContentInner operationsPutContent) { return createOrUpdateWithResponse(providerNamespace, operationsPutContent, Context.NONE).getValue(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsContentImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsContentImpl.java deleted file mode 100644 index e2b8746cb9c9..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsContentImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.implementation; - -import com.azure.resourcemanager.providerhub.fluent.models.OperationsContentInner; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsContent; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; - -public final class OperationsContentImpl implements OperationsContent { - private OperationsContentInner innerObject; - - private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; - - OperationsContentImpl(OperationsContentInner innerObject, - com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String namePropertiesName() { - return this.innerModel().namePropertiesName(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationOrigins origin() { - return this.innerModel().origin(); - } - - public OperationsDefinitionDisplay display() { - return this.innerModel().display(); - } - - public OperationActionType actionType() { - return this.innerModel().actionType(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public OperationsContentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsImpl.java index 6816ad631670..fb744306d545 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsImpl.java @@ -10,10 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.providerhub.fluent.OperationsClient; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsContentInner; import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; import com.azure.resourcemanager.providerhub.models.Operations; -import com.azure.resourcemanager.providerhub.models.OperationsContent; import com.azure.resourcemanager.providerhub.models.OperationsDefinition; import com.azure.resourcemanager.providerhub.models.OperationsPutContent; import java.util.Collections; @@ -69,22 +68,23 @@ public List listByProviderRegistration(String providerName } } - public Response createOrUpdateWithResponse(String providerNamespace, - OperationsPutContent operationsPutContent, Context context) { - Response inner + public Response createOrUpdateWithResponse(String providerNamespace, + OperationsPutContentInner operationsPutContent, Context context) { + Response inner = this.serviceClient().createOrUpdateWithResponse(providerNamespace, operationsPutContent, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OperationsContentImpl(inner.getValue(), this.manager())); + new OperationsPutContentImpl(inner.getValue(), this.manager())); } else { return null; } } - public OperationsContent createOrUpdate(String providerNamespace, OperationsPutContent operationsPutContent) { - OperationsContentInner inner = this.serviceClient().createOrUpdate(providerNamespace, operationsPutContent); + public OperationsPutContent createOrUpdate(String providerNamespace, + OperationsPutContentInner operationsPutContent) { + OperationsPutContentInner inner = this.serviceClient().createOrUpdate(providerNamespace, operationsPutContent); if (inner != null) { - return new OperationsContentImpl(inner, this.manager()); + return new OperationsPutContentImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsPutContentImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsPutContentImpl.java new file mode 100644 index 000000000000..1d0e4be2e140 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/OperationsPutContentImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; +import com.azure.resourcemanager.providerhub.models.OperationsPutContent; +import com.azure.resourcemanager.providerhub.models.OperationsPutContentProperties; + +public final class OperationsPutContentImpl implements OperationsPutContent { + private OperationsPutContentInner innerObject; + + private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; + + OperationsPutContentImpl(OperationsPutContentInner innerObject, + com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public OperationsPutContentProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public OperationsPutContentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderHubImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderHubImpl.java index aac7619ad60d..78dd462045c7 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderHubImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderHubImpl.java @@ -23,12 +23,16 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.providerhub.fluent.AuthorizedApplicationsClient; import com.azure.resourcemanager.providerhub.fluent.CustomRolloutsClient; import com.azure.resourcemanager.providerhub.fluent.DefaultRolloutsClient; +import com.azure.resourcemanager.providerhub.fluent.NewRegionFrontloadReleasesClient; import com.azure.resourcemanager.providerhub.fluent.NotificationRegistrationsClient; import com.azure.resourcemanager.providerhub.fluent.OperationsClient; import com.azure.resourcemanager.providerhub.fluent.ProviderHub; +import com.azure.resourcemanager.providerhub.fluent.ProviderMonitorSettingsClient; import com.azure.resourcemanager.providerhub.fluent.ProviderRegistrationsClient; +import com.azure.resourcemanager.providerhub.fluent.ResourceActionsClient; import com.azure.resourcemanager.providerhub.fluent.ResourceProvidersClient; import com.azure.resourcemanager.providerhub.fluent.ResourceTypeRegistrationsClient; import com.azure.resourcemanager.providerhub.fluent.SkusClient; @@ -242,6 +246,62 @@ public SkusClient getSkus() { return this.skus; } + /** + * The ResourceActionsClient object to access its operations. + */ + private final ResourceActionsClient resourceActions; + + /** + * Gets the ResourceActionsClient object to access its operations. + * + * @return the ResourceActionsClient object. + */ + public ResourceActionsClient getResourceActions() { + return this.resourceActions; + } + + /** + * The AuthorizedApplicationsClient object to access its operations. + */ + private final AuthorizedApplicationsClient authorizedApplications; + + /** + * Gets the AuthorizedApplicationsClient object to access its operations. + * + * @return the AuthorizedApplicationsClient object. + */ + public AuthorizedApplicationsClient getAuthorizedApplications() { + return this.authorizedApplications; + } + + /** + * The ProviderMonitorSettingsClient object to access its operations. + */ + private final ProviderMonitorSettingsClient providerMonitorSettings; + + /** + * Gets the ProviderMonitorSettingsClient object to access its operations. + * + * @return the ProviderMonitorSettingsClient object. + */ + public ProviderMonitorSettingsClient getProviderMonitorSettings() { + return this.providerMonitorSettings; + } + + /** + * The NewRegionFrontloadReleasesClient object to access its operations. + */ + private final NewRegionFrontloadReleasesClient newRegionFrontloadReleases; + + /** + * Gets the NewRegionFrontloadReleasesClient object to access its operations. + * + * @return the NewRegionFrontloadReleasesClient object. + */ + public NewRegionFrontloadReleasesClient getNewRegionFrontloadReleases() { + return this.newRegionFrontloadReleases; + } + /** * Initializes an instance of ProviderHub client. * @@ -259,7 +319,7 @@ public SkusClient getSkus() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2020-11-20"; + this.apiVersion = "2024-09-01"; this.customRollouts = new CustomRolloutsClientImpl(this); this.defaultRollouts = new DefaultRolloutsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); @@ -268,6 +328,10 @@ public SkusClient getSkus() { this.providerRegistrations = new ProviderRegistrationsClientImpl(this); this.resourceTypeRegistrations = new ResourceTypeRegistrationsClientImpl(this); this.skus = new SkusClientImpl(this); + this.resourceActions = new ResourceActionsClientImpl(this); + this.authorizedApplications = new AuthorizedApplicationsClientImpl(this); + this.providerMonitorSettings = new ProviderMonitorSettingsClientImpl(this); + this.newRegionFrontloadReleases = new NewRegionFrontloadReleasesClientImpl(this); } /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingImpl.java new file mode 100644 index 000000000000..a22d68acce6b --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingImpl.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.providerhub.fluent.models.ProviderMonitorSettingInner; +import com.azure.resourcemanager.providerhub.models.ProviderMonitorSetting; +import com.azure.resourcemanager.providerhub.models.ProviderMonitorSettingProperties; +import java.util.Collections; +import java.util.Map; + +public final class ProviderMonitorSettingImpl implements ProviderMonitorSetting, ProviderMonitorSetting.Definition { + private ProviderMonitorSettingInner innerObject; + + private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; + + ProviderMonitorSettingImpl(ProviderMonitorSettingInner innerObject, + com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ProviderMonitorSettingProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public ProviderMonitorSettingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String providerMonitorSettingName; + + public ProviderMonitorSettingImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ProviderMonitorSetting create() { + this.innerObject = serviceManager.serviceClient() + .getProviderMonitorSettings() + .create(resourceGroupName, providerMonitorSettingName, this.innerModel(), Context.NONE); + return this; + } + + public ProviderMonitorSetting create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getProviderMonitorSettings() + .create(resourceGroupName, providerMonitorSettingName, this.innerModel(), context); + return this; + } + + ProviderMonitorSettingImpl(String name, com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerObject = new ProviderMonitorSettingInner(); + this.serviceManager = serviceManager; + this.providerMonitorSettingName = name; + } + + public ProviderMonitorSetting refresh() { + this.innerObject = serviceManager.serviceClient() + .getProviderMonitorSettings() + .getByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, Context.NONE) + .getValue(); + return this; + } + + public ProviderMonitorSetting refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getProviderMonitorSettings() + .getByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, context) + .getValue(); + return this; + } + + public ProviderMonitorSettingImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ProviderMonitorSettingImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ProviderMonitorSettingImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public ProviderMonitorSettingImpl withProperties(ProviderMonitorSettingProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsClientImpl.java new file mode 100644 index 000000000000..15f1d2900ea2 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsClientImpl.java @@ -0,0 +1,1109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.providerhub.fluent.ProviderMonitorSettingsClient; +import com.azure.resourcemanager.providerhub.fluent.models.ProviderMonitorSettingInner; +import com.azure.resourcemanager.providerhub.models.ProviderMonitorSettingArrayResponseWithContinuation; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ProviderMonitorSettingsClient. + */ +public final class ProviderMonitorSettingsClientImpl implements ProviderMonitorSettingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ProviderMonitorSettingsService service; + + /** + * The service client containing this operation class. + */ + private final ProviderHubImpl client; + + /** + * Initializes an instance of ProviderMonitorSettingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProviderMonitorSettingsClientImpl(ProviderHubImpl client) { + this.service = RestProxy.create(ProviderMonitorSettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ProviderHubProviderMonitorSettings to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ProviderHubProviderM") + public interface ProviderMonitorSettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("providerMonitorSettingName") String providerMonitorSettingName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("providerMonitorSettingName") String providerMonitorSettingName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ProviderMonitorSettingInner properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("providerMonitorSettingName") String providerMonitorSettingName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("providerMonitorSettingName") String providerMonitorSettingName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerMonitorSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String providerMonitorSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, providerMonitorSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String providerMonitorSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + providerMonitorSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String providerMonitorSettingName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, providerMonitorSettingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String providerMonitorSettingName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, providerMonitorSettingName, context).block(); + } + + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProviderMonitorSettingInner getByResourceGroup(String resourceGroupName, String providerMonitorSettingName) { + return getByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, Context.NONE).getValue(); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String providerMonitorSettingName, ProviderMonitorSettingInner properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + providerMonitorSettingName, this.client.getApiVersion(), properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String providerMonitorSettingName, ProviderMonitorSettingInner properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + providerMonitorSettingName, this.client.getApiVersion(), properties, accept, context); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ProviderMonitorSettingInner> beginCreateAsync( + String resourceGroupName, String providerMonitorSettingName, ProviderMonitorSettingInner properties) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, providerMonitorSettingName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ProviderMonitorSettingInner.class, ProviderMonitorSettingInner.class, + this.client.getContext()); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ProviderMonitorSettingInner> beginCreateAsync( + String resourceGroupName, String providerMonitorSettingName, ProviderMonitorSettingInner properties, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, providerMonitorSettingName, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ProviderMonitorSettingInner.class, ProviderMonitorSettingInner.class, + context); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProviderMonitorSettingInner> beginCreate( + String resourceGroupName, String providerMonitorSettingName, ProviderMonitorSettingInner properties) { + return this.beginCreateAsync(resourceGroupName, providerMonitorSettingName, properties).getSyncPoller(); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProviderMonitorSettingInner> beginCreate( + String resourceGroupName, String providerMonitorSettingName, ProviderMonitorSettingInner properties, + Context context) { + return this.beginCreateAsync(resourceGroupName, providerMonitorSettingName, properties, context) + .getSyncPoller(); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String providerMonitorSettingName, + ProviderMonitorSettingInner properties) { + return beginCreateAsync(resourceGroupName, providerMonitorSettingName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String providerMonitorSettingName, + ProviderMonitorSettingInner properties, Context context) { + return beginCreateAsync(resourceGroupName, providerMonitorSettingName, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProviderMonitorSettingInner create(String resourceGroupName, String providerMonitorSettingName, + ProviderMonitorSettingInner properties) { + return createAsync(resourceGroupName, providerMonitorSettingName, properties).block(); + } + + /** + * Creates the provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param properties The provider monitor setting properties supplied to the create operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProviderMonitorSettingInner create(String resourceGroupName, String providerMonitorSettingName, + ProviderMonitorSettingInner properties, Context context) { + return createAsync(resourceGroupName, providerMonitorSettingName, properties, context).block(); + } + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String providerMonitorSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, providerMonitorSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String providerMonitorSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + providerMonitorSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String providerMonitorSettingName) { + return updateWithResponseAsync(resourceGroupName, providerMonitorSettingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, + String providerMonitorSettingName, Context context) { + return updateWithResponseAsync(resourceGroupName, providerMonitorSettingName, context).block(); + } + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProviderMonitorSettingInner update(String resourceGroupName, String providerMonitorSettingName) { + return updateWithResponse(resourceGroupName, providerMonitorSettingName, Context.NONE).getValue(); + } + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String providerMonitorSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, providerMonitorSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String providerMonitorSettingName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (providerMonitorSettingName == null) { + return Mono.error( + new IllegalArgumentException("Parameter providerMonitorSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + providerMonitorSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String providerMonitorSettingName) { + return deleteWithResponseAsync(resourceGroupName, providerMonitorSettingName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String providerMonitorSettingName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, providerMonitorSettingName, context).block(); + } + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String providerMonitorSettingName) { + deleteWithResponse(resourceGroupName, providerMonitorSettingName, Context.NONE); + } + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsImpl.java new file mode 100644 index 000000000000..ed066e6270a0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderMonitorSettingsImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.providerhub.fluent.ProviderMonitorSettingsClient; +import com.azure.resourcemanager.providerhub.fluent.models.ProviderMonitorSettingInner; +import com.azure.resourcemanager.providerhub.models.ProviderMonitorSetting; +import com.azure.resourcemanager.providerhub.models.ProviderMonitorSettings; + +public final class ProviderMonitorSettingsImpl implements ProviderMonitorSettings { + private static final ClientLogger LOGGER = new ClientLogger(ProviderMonitorSettingsImpl.class); + + private final ProviderMonitorSettingsClient innerClient; + + private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; + + public ProviderMonitorSettingsImpl(ProviderMonitorSettingsClient innerClient, + com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String providerMonitorSettingName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ProviderMonitorSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ProviderMonitorSetting getByResourceGroup(String resourceGroupName, String providerMonitorSettingName) { + ProviderMonitorSettingInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, providerMonitorSettingName); + if (inner != null) { + return new ProviderMonitorSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse(String resourceGroupName, + String providerMonitorSettingName, Context context) { + Response inner + = this.serviceClient().updateWithResponse(resourceGroupName, providerMonitorSettingName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ProviderMonitorSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ProviderMonitorSetting update(String resourceGroupName, String providerMonitorSettingName) { + ProviderMonitorSettingInner inner = this.serviceClient().update(resourceGroupName, providerMonitorSettingName); + if (inner != null) { + return new ProviderMonitorSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String providerMonitorSettingName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, providerMonitorSettingName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String providerMonitorSettingName) { + this.serviceClient().delete(resourceGroupName, providerMonitorSettingName); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProviderMonitorSettingImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProviderMonitorSettingImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProviderMonitorSettingImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProviderMonitorSettingImpl(inner1, this.manager())); + } + + public ProviderMonitorSetting getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String providerMonitorSettingName = ResourceManagerUtils.getValueFromIdByName(id, "providerMonitorSettings"); + if (providerMonitorSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'providerMonitorSettings'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String providerMonitorSettingName = ResourceManagerUtils.getValueFromIdByName(id, "providerMonitorSettings"); + if (providerMonitorSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'providerMonitorSettings'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String providerMonitorSettingName = ResourceManagerUtils.getValueFromIdByName(id, "providerMonitorSettings"); + if (providerMonitorSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'providerMonitorSettings'.", id))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String providerMonitorSettingName = ResourceManagerUtils.getValueFromIdByName(id, "providerMonitorSettings"); + if (providerMonitorSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'providerMonitorSettings'.", id))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, providerMonitorSettingName, context); + } + + private ProviderMonitorSettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { + return this.serviceManager; + } + + public ProviderMonitorSettingImpl define(String name) { + return new ProviderMonitorSettingImpl(name, this.manager()); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderRegistrationImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderRegistrationImpl.java index c27a93b6f0f2..acf1e285b3fb 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderRegistrationImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ProviderRegistrationImpl.java @@ -4,8 +4,10 @@ package com.azure.resourcemanager.providerhub.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.providerhub.fluent.models.ProviderRegistrationInner; import com.azure.resourcemanager.providerhub.models.ProviderRegistration; +import com.azure.resourcemanager.providerhub.models.ProviderRegistrationKind; import com.azure.resourcemanager.providerhub.models.ProviderRegistrationProperties; public final class ProviderRegistrationImpl implements ProviderRegistration { @@ -35,6 +37,14 @@ public ProviderRegistrationProperties properties() { return this.innerModel().properties(); } + public ProviderRegistrationKind kind() { + return this.innerModel().kind(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public ProviderRegistrationInner innerModel() { return this.innerObject; } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsClientImpl.java new file mode 100644 index 000000000000..77b284b23b1a --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsClientImpl.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.providerhub.fluent.ResourceActionsClient; +import com.azure.resourcemanager.providerhub.models.ResourceManagementAction; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ResourceActionsClient. + */ +public final class ResourceActionsClientImpl implements ResourceActionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ResourceActionsService service; + + /** + * The service client containing this operation class. + */ + private final ProviderHubImpl client; + + /** + * Initializes an instance of ResourceActionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResourceActionsClientImpl(ProviderHubImpl client) { + this.service + = RestProxy.create(ResourceActionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ProviderHubResourceActions to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ProviderHubResourceA") + public interface ResourceActionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourceActions/{resourceActionName}/deleteResources") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteResources(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("providerNamespace") String providerNamespace, + @PathParam("resourceActionName") String resourceActionName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ResourceManagementAction properties, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteResourcesWithResponseAsync(String providerNamespace, + String resourceActionName, ResourceManagementAction properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (resourceActionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceActionName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteResources(this.client.getEndpoint(), this.client.getSubscriptionId(), + providerNamespace, resourceActionName, this.client.getApiVersion(), properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteResourcesWithResponseAsync(String providerNamespace, + String resourceActionName, ResourceManagementAction properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (providerNamespace == null) { + return Mono + .error(new IllegalArgumentException("Parameter providerNamespace is required and cannot be null.")); + } + if (resourceActionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceActionName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteResources(this.client.getEndpoint(), this.client.getSubscriptionId(), providerNamespace, + resourceActionName, this.client.getApiVersion(), properties, accept, context); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteResourcesAsync(String providerNamespace, + String resourceActionName, ResourceManagementAction properties) { + Mono>> mono + = deleteResourcesWithResponseAsync(providerNamespace, resourceActionName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteResourcesAsync(String providerNamespace, + String resourceActionName, ResourceManagementAction properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteResourcesWithResponseAsync(providerNamespace, resourceActionName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties) { + return this.beginDeleteResourcesAsync(providerNamespace, resourceActionName, properties).getSyncPoller(); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties, Context context) { + return this.beginDeleteResourcesAsync(providerNamespace, resourceActionName, properties, context) + .getSyncPoller(); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteResourcesAsync(String providerNamespace, String resourceActionName, + ResourceManagementAction properties) { + return beginDeleteResourcesAsync(providerNamespace, resourceActionName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteResourcesAsync(String providerNamespace, String resourceActionName, + ResourceManagementAction properties, Context context) { + return beginDeleteResourcesAsync(providerNamespace, resourceActionName, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties) { + deleteResourcesAsync(providerNamespace, resourceActionName, properties).block(); + } + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties, Context context) { + deleteResourcesAsync(providerNamespace, resourceActionName, properties, context).block(); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsImpl.java new file mode 100644 index 000000000000..bba31ff5428d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceActionsImpl.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.providerhub.fluent.ResourceActionsClient; +import com.azure.resourcemanager.providerhub.models.ResourceActions; +import com.azure.resourcemanager.providerhub.models.ResourceManagementAction; + +public final class ResourceActionsImpl implements ResourceActions { + private static final ClientLogger LOGGER = new ClientLogger(ResourceActionsImpl.class); + + private final ResourceActionsClient innerClient; + + private final com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager; + + public ResourceActionsImpl(ResourceActionsClient innerClient, + com.azure.resourcemanager.providerhub.ProviderHubManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void deleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties) { + this.serviceClient().deleteResources(providerNamespace, resourceActionName, properties); + } + + public void deleteResources(String providerNamespace, String resourceActionName, + ResourceManagementAction properties, Context context) { + this.serviceClient().deleteResources(providerNamespace, resourceActionName, properties, context); + } + + private ResourceActionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.providerhub.ProviderHubManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceProviderManifestImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceProviderManifestImpl.java index 56af32189b0a..d9700a1f8de9 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceProviderManifestImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceProviderManifestImpl.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.providerhub.implementation; import com.azure.resourcemanager.providerhub.fluent.models.ResourceProviderManifestInner; +import com.azure.resourcemanager.providerhub.models.CrossTenantTokenValidation; +import com.azure.resourcemanager.providerhub.models.FanoutLinkedNotificationRule; +import com.azure.resourcemanager.providerhub.models.Notification; import com.azure.resourcemanager.providerhub.models.ResourceProviderAuthorization; +import com.azure.resourcemanager.providerhub.models.ResourceProviderAuthorizationRules; import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilities; import com.azure.resourcemanager.providerhub.models.ResourceProviderEndpoint; import com.azure.resourcemanager.providerhub.models.ResourceProviderManifest; @@ -14,6 +18,7 @@ import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestProviderAuthentication; import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestReRegisterSubscriptionMetadata; import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestRequestHeaderOptions; +import com.azure.resourcemanager.providerhub.models.ResourceProviderService; import com.azure.resourcemanager.providerhub.models.ResourceProviderType; import com.azure.resourcemanager.providerhub.models.ResourceType; import java.util.Collections; @@ -47,6 +52,19 @@ public String namespace() { return this.innerModel().namespace(); } + public List services() { + List inner = this.innerModel().services(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String serviceName() { + return this.innerModel().serviceName(); + } + public String providerVersion() { return this.innerModel().providerVersion(); } @@ -94,6 +112,10 @@ public List capabilities() { } } + public CrossTenantTokenValidation crossTenantTokenValidation() { + return this.innerModel().crossTenantTokenValidation(); + } + public Object metadata() { return this.innerModel().metadata(); } @@ -111,6 +133,32 @@ public ResourceProviderManifestReRegisterSubscriptionMetadata reRegisterSubscrip return this.innerModel().reRegisterSubscriptionMetadata(); } + public Boolean enableTenantLinkedNotification() { + return this.innerModel().enableTenantLinkedNotification(); + } + + public List notifications() { + List inner = this.innerModel().notifications(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List linkedNotificationRules() { + List inner = this.innerModel().linkedNotificationRules(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ResourceProviderAuthorizationRules resourceProviderAuthorizationRules() { + return this.innerModel().resourceProviderAuthorizationRules(); + } + public ResourceProviderManifestInner innerModel() { return this.innerObject; } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationImpl.java index 0f98045c4719..1bcb194ec14d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationImpl.java @@ -4,9 +4,11 @@ package com.azure.resourcemanager.providerhub.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.ResourceTypeRegistrationInner; import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationKind; import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationProperties; public final class ResourceTypeRegistrationImpl @@ -31,6 +33,14 @@ public ResourceTypeRegistrationProperties properties() { return this.innerModel().properties(); } + public ResourceTypeRegistrationKind kind() { + return this.innerModel().kind(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public ResourceTypeRegistrationInner innerModel() { return this.innerObject; } @@ -114,4 +124,9 @@ public ResourceTypeRegistrationImpl withProperties(ResourceTypeRegistrationPrope this.innerModel().withProperties(properties); return this; } + + public ResourceTypeRegistrationImpl withKind(ResourceTypeRegistrationKind kind) { + this.innerModel().withKind(kind); + return this; + } } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsClientImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsClientImpl.java index 303d80ee8a4f..e8503192edb2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsClientImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsClientImpl.java @@ -92,9 +92,9 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}") - @ExpectedResponses({ 200, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("providerNamespace") String providerNamespace, @PathParam("resourceType") String resourceType, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @@ -492,7 +492,7 @@ public ResourceTypeRegistrationInner createOrUpdate(String providerNamespace, St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String providerNamespace, String resourceType) { + private Mono>> deleteWithResponseAsync(String providerNamespace, String resourceType) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -527,7 +527,7 @@ private Mono> deleteWithResponseAsync(String providerNamespace, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String providerNamespace, String resourceType, + private Mono>> deleteWithResponseAsync(String providerNamespace, String resourceType, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -550,6 +550,75 @@ private Mono> deleteWithResponseAsync(String providerNamespace, S resourceType, this.client.getApiVersion(), accept, context); } + /** + * Deletes a resource type. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceType The resource type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String providerNamespace, String resourceType) { + Mono>> mono = deleteWithResponseAsync(providerNamespace, resourceType); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a resource type. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceType The resource type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String providerNamespace, String resourceType, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(providerNamespace, resourceType, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a resource type. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceType The resource type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String providerNamespace, String resourceType) { + return this.beginDeleteAsync(providerNamespace, resourceType).getSyncPoller(); + } + + /** + * Deletes a resource type. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceType The resource type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String providerNamespace, String resourceType, + Context context) { + return this.beginDeleteAsync(providerNamespace, resourceType, context).getSyncPoller(); + } + /** * Deletes a resource type. * @@ -562,7 +631,7 @@ private Mono> deleteWithResponseAsync(String providerNamespace, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String providerNamespace, String resourceType) { - return deleteWithResponseAsync(providerNamespace, resourceType).flatMap(ignored -> Mono.empty()); + return beginDeleteAsync(providerNamespace, resourceType).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -574,11 +643,12 @@ private Mono deleteAsync(String providerNamespace, String resourceType) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String providerNamespace, String resourceType, Context context) { - return deleteWithResponseAsync(providerNamespace, resourceType, context).block(); + private Mono deleteAsync(String providerNamespace, String resourceType, Context context) { + return beginDeleteAsync(providerNamespace, resourceType, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -592,7 +662,22 @@ public Response deleteWithResponse(String providerNamespace, String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String providerNamespace, String resourceType) { - deleteWithResponse(providerNamespace, resourceType, Context.NONE); + deleteAsync(providerNamespace, resourceType).block(); + } + + /** + * Deletes a resource type. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceType The resource type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String providerNamespace, String resourceType, Context context) { + deleteAsync(providerNamespace, resourceType, context).block(); } /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsImpl.java index 4cee9f9c2431..c6b622884312 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/ResourceTypeRegistrationsImpl.java @@ -48,15 +48,14 @@ public ResourceTypeRegistration get(String providerNamespace, String resourceTyp } } - public Response deleteByResourceGroupWithResponse(String providerNamespace, String resourceType, - Context context) { - return this.serviceClient().deleteWithResponse(providerNamespace, resourceType, context); - } - public void deleteByResourceGroup(String providerNamespace, String resourceType) { this.serviceClient().delete(providerNamespace, resourceType); } + public void delete(String providerNamespace, String resourceType, Context context) { + this.serviceClient().delete(providerNamespace, resourceType, context); + } + public PagedIterable listByProviderRegistration(String providerNamespace) { PagedIterable inner = this.serviceClient().listByProviderRegistration(providerNamespace); @@ -109,10 +108,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'resourcetypeRegistrations'.", id))); } - this.deleteByResourceGroupWithResponse(providerNamespace, resourceType, Context.NONE); + this.delete(providerNamespace, resourceType, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { + public void deleteByIdWithResponse(String id, Context context) { String providerNamespace = ResourceManagerUtils.getValueFromIdByName(id, "providerRegistrations"); if (providerNamespace == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -123,7 +122,7 @@ public Response deleteByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'resourcetypeRegistrations'.", id))); } - return this.deleteByResourceGroupWithResponse(providerNamespace, resourceType, context); + this.delete(providerNamespace, resourceType, context); } private ResourceTypeRegistrationsClient serviceClient() { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/SkuResourceImpl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/SkuResourceImpl.java index acc2a776f466..049cba4a5c38 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/SkuResourceImpl.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/SkuResourceImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.providerhub.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; import com.azure.resourcemanager.providerhub.models.SkuResource; @@ -30,6 +31,10 @@ public SkuResourceProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public SkuResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/package-info.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/package-info.java index e44edb6e6b7e..4f187bf86c48 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/package-info.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/implementation/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the implementations for ProviderHub. - * Microsoft ProviderHub. + * Provider Hub. */ package com.azure.resourcemanager.providerhub.implementation; diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalAuthorization.java new file mode 100644 index 000000000000..0ba2de2a6380 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalAuthorization.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AdditionalAuthorization model. + */ +@Fluent +public final class AdditionalAuthorization implements JsonSerializable { + /* + * The applicationId property. + */ + private String applicationId; + + /* + * The roleDefinitionId property. + */ + private String roleDefinitionId; + + /** + * Creates an instance of AdditionalAuthorization class. + */ + public AdditionalAuthorization() { + } + + /** + * Get the applicationId property: The applicationId property. + * + * @return the applicationId value. + */ + public String applicationId() { + return this.applicationId; + } + + /** + * Set the applicationId property: The applicationId property. + * + * @param applicationId the applicationId value to set. + * @return the AdditionalAuthorization object itself. + */ + public AdditionalAuthorization withApplicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Get the roleDefinitionId property: The roleDefinitionId property. + * + * @return the roleDefinitionId value. + */ + public String roleDefinitionId() { + return this.roleDefinitionId; + } + + /** + * Set the roleDefinitionId property: The roleDefinitionId property. + * + * @param roleDefinitionId the roleDefinitionId value to set. + * @return the AdditionalAuthorization object itself. + */ + public AdditionalAuthorization withRoleDefinitionId(String roleDefinitionId) { + this.roleDefinitionId = roleDefinitionId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("applicationId", this.applicationId); + jsonWriter.writeStringField("roleDefinitionId", this.roleDefinitionId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdditionalAuthorization from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdditionalAuthorization 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 AdditionalAuthorization. + */ + public static AdditionalAuthorization fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdditionalAuthorization deserializedAdditionalAuthorization = new AdditionalAuthorization(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("applicationId".equals(fieldName)) { + deserializedAdditionalAuthorization.applicationId = reader.getString(); + } else if ("roleDefinitionId".equals(fieldName)) { + deserializedAdditionalAuthorization.roleDefinitionId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdditionalAuthorization; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptions.java new file mode 100644 index 000000000000..24f859c37ea0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptions.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The additional options. + */ +public final class AdditionalOptions extends ExpandableStringEnum { + /** + * Static value ProtectedAsyncOperationPolling for AdditionalOptions. + */ + public static final AdditionalOptions PROTECTED_ASYNC_OPERATION_POLLING + = fromString("ProtectedAsyncOperationPolling"); + + /** + * Static value ProtectedAsyncOperationPollingAuditOnly for AdditionalOptions. + */ + public static final AdditionalOptions PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY + = fromString("ProtectedAsyncOperationPollingAuditOnly"); + + /** + * Creates a new instance of AdditionalOptions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdditionalOptions() { + } + + /** + * Creates or finds a AdditionalOptions from its string representation. + * + * @param name a name to look for. + * @return the corresponding AdditionalOptions. + */ + public static AdditionalOptions fromString(String name) { + return fromString(name, AdditionalOptions.class); + } + + /** + * Gets known AdditionalOptions values. + * + * @return known AdditionalOptions values. + */ + public static Collection values() { + return values(AdditionalOptions.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsAsyncOperation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsAsyncOperation.java new file mode 100644 index 000000000000..f10d4dab67c7 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsAsyncOperation.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The additional options. + */ +public final class AdditionalOptionsAsyncOperation extends ExpandableStringEnum { + /** + * Static value ProtectedAsyncOperationPolling for AdditionalOptionsAsyncOperation. + */ + public static final AdditionalOptionsAsyncOperation PROTECTED_ASYNC_OPERATION_POLLING + = fromString("ProtectedAsyncOperationPolling"); + + /** + * Static value ProtectedAsyncOperationPollingAuditOnly for AdditionalOptionsAsyncOperation. + */ + public static final AdditionalOptionsAsyncOperation PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY + = fromString("ProtectedAsyncOperationPollingAuditOnly"); + + /** + * Creates a new instance of AdditionalOptionsAsyncOperation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdditionalOptionsAsyncOperation() { + } + + /** + * Creates or finds a AdditionalOptionsAsyncOperation from its string representation. + * + * @param name a name to look for. + * @return the corresponding AdditionalOptionsAsyncOperation. + */ + public static AdditionalOptionsAsyncOperation fromString(String name) { + return fromString(name, AdditionalOptionsAsyncOperation.class); + } + + /** + * Gets known AdditionalOptionsAsyncOperation values. + * + * @return known AdditionalOptionsAsyncOperation values. + */ + public static Collection values() { + return values(AdditionalOptionsAsyncOperation.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsResourceTypeRegistration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsResourceTypeRegistration.java new file mode 100644 index 000000000000..dd5c46f47140 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AdditionalOptionsResourceTypeRegistration.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The additional options. + */ +public final class AdditionalOptionsResourceTypeRegistration + extends ExpandableStringEnum { + /** + * Static value ProtectedAsyncOperationPolling for AdditionalOptionsResourceTypeRegistration. + */ + public static final AdditionalOptionsResourceTypeRegistration PROTECTED_ASYNC_OPERATION_POLLING + = fromString("ProtectedAsyncOperationPolling"); + + /** + * Static value ProtectedAsyncOperationPollingAuditOnly for AdditionalOptionsResourceTypeRegistration. + */ + public static final AdditionalOptionsResourceTypeRegistration PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY + = fromString("ProtectedAsyncOperationPollingAuditOnly"); + + /** + * Creates a new instance of AdditionalOptionsResourceTypeRegistration value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AdditionalOptionsResourceTypeRegistration() { + } + + /** + * Creates or finds a AdditionalOptionsResourceTypeRegistration from its string representation. + * + * @param name a name to look for. + * @return the corresponding AdditionalOptionsResourceTypeRegistration. + */ + public static AdditionalOptionsResourceTypeRegistration fromString(String name) { + return fromString(name, AdditionalOptionsResourceTypeRegistration.class); + } + + /** + * Gets known AdditionalOptionsResourceTypeRegistration values. + * + * @return known AdditionalOptionsResourceTypeRegistration values. + */ + public static Collection values() { + return values(AdditionalOptionsResourceTypeRegistration.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedResourceName.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedResourceName.java new file mode 100644 index 000000000000..539103546cb9 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedResourceName.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AllowedResourceName model. + */ +@Fluent +public final class AllowedResourceName implements JsonSerializable { + /* + * Resource name. + */ + private String name; + + /* + * Get action verb. + */ + private String getActionVerb; + + /** + * Creates an instance of AllowedResourceName class. + */ + public AllowedResourceName() { + } + + /** + * Get the name property: Resource name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Resource name. + * + * @param name the name value to set. + * @return the AllowedResourceName object itself. + */ + public AllowedResourceName withName(String name) { + this.name = name; + return this; + } + + /** + * Get the getActionVerb property: Get action verb. + * + * @return the getActionVerb value. + */ + public String getActionVerb() { + return this.getActionVerb; + } + + /** + * Set the getActionVerb property: Get action verb. + * + * @param getActionVerb the getActionVerb value to set. + * @return the AllowedResourceName object itself. + */ + public AllowedResourceName withGetActionVerb(String getActionVerb) { + this.getActionVerb = getActionVerb; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("getActionVerb", this.getActionVerb); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AllowedResourceName from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AllowedResourceName 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 AllowedResourceName. + */ + public static AllowedResourceName fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AllowedResourceName deserializedAllowedResourceName = new AllowedResourceName(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedAllowedResourceName.name = reader.getString(); + } else if ("getActionVerb".equals(fieldName)) { + deserializedAllowedResourceName.getActionVerb = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAllowedResourceName; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedUnauthorizedActionsExtension.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedUnauthorizedActionsExtension.java new file mode 100644 index 000000000000..567a65dbbacc --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AllowedUnauthorizedActionsExtension.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AllowedUnauthorizedActionsExtension model. + */ +@Fluent +public final class AllowedUnauthorizedActionsExtension + implements JsonSerializable { + /* + * The action. + */ + private String action; + + /* + * The intent. + */ + private Intent intent; + + /** + * Creates an instance of AllowedUnauthorizedActionsExtension class. + */ + public AllowedUnauthorizedActionsExtension() { + } + + /** + * Get the action property: The action. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Set the action property: The action. + * + * @param action the action value to set. + * @return the AllowedUnauthorizedActionsExtension object itself. + */ + public AllowedUnauthorizedActionsExtension withAction(String action) { + this.action = action; + return this; + } + + /** + * Get the intent property: The intent. + * + * @return the intent value. + */ + public Intent intent() { + return this.intent; + } + + /** + * Set the intent property: The intent. + * + * @param intent the intent value to set. + * @return the AllowedUnauthorizedActionsExtension object itself. + */ + public AllowedUnauthorizedActionsExtension withIntent(Intent intent) { + this.intent = intent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("action", this.action); + jsonWriter.writeStringField("intent", this.intent == null ? null : this.intent.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AllowedUnauthorizedActionsExtension from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AllowedUnauthorizedActionsExtension 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 AllowedUnauthorizedActionsExtension. + */ + public static AllowedUnauthorizedActionsExtension fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AllowedUnauthorizedActionsExtension deserializedAllowedUnauthorizedActionsExtension + = new AllowedUnauthorizedActionsExtension(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("action".equals(fieldName)) { + deserializedAllowedUnauthorizedActionsExtension.action = reader.getString(); + } else if ("intent".equals(fieldName)) { + deserializedAllowedUnauthorizedActionsExtension.intent = Intent.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAllowedUnauthorizedActionsExtension; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApiProfile.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApiProfile.java new file mode 100644 index 000000000000..47f0c56a47b8 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApiProfile.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ApiProfile model. + */ +@Fluent +public final class ApiProfile implements JsonSerializable { + /* + * Profile version. + */ + private String profileVersion; + + /* + * Api version. + */ + private String apiVersion; + + /** + * Creates an instance of ApiProfile class. + */ + public ApiProfile() { + } + + /** + * Get the profileVersion property: Profile version. + * + * @return the profileVersion value. + */ + public String profileVersion() { + return this.profileVersion; + } + + /** + * Set the profileVersion property: Profile version. + * + * @param profileVersion the profileVersion value to set. + * @return the ApiProfile object itself. + */ + public ApiProfile withProfileVersion(String profileVersion) { + this.profileVersion = profileVersion; + return this; + } + + /** + * Get the apiVersion property: Api version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Set the apiVersion property: Api version. + * + * @param apiVersion the apiVersion value to set. + * @return the ApiProfile object itself. + */ + public ApiProfile withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("profileVersion", this.profileVersion); + jsonWriter.writeStringField("apiVersion", this.apiVersion); + 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/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationDataAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationDataAuthorization.java new file mode 100644 index 000000000000..b33166e00d82 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationDataAuthorization.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ApplicationDataAuthorization model. + */ +@Fluent +public final class ApplicationDataAuthorization implements JsonSerializable { + /* + * The ownership role the application has on the resource types. The service owner role gives the application owner + * permissions. The limited owner role gives elevated permissions but does not allow all the permissions of a + * service owner, such as read/write on internal metadata. + */ + private Role role; + + /* + * The resource types from the defined resource types in the provider namespace that the application can access. If + * no resource types are specified and the role is service owner, the default is * which is all resource types + */ + private List resourceTypes; + + /** + * Creates an instance of ApplicationDataAuthorization class. + */ + public ApplicationDataAuthorization() { + } + + /** + * Get the role property: The ownership role the application has on the resource types. The service owner role gives + * the application owner permissions. The limited owner role gives elevated permissions but does not allow all the + * permissions of a service owner, such as read/write on internal metadata. + * + * @return the role value. + */ + public Role role() { + return this.role; + } + + /** + * Set the role property: The ownership role the application has on the resource types. The service owner role gives + * the application owner permissions. The limited owner role gives elevated permissions but does not allow all the + * permissions of a service owner, such as read/write on internal metadata. + * + * @param role the role value to set. + * @return the ApplicationDataAuthorization object itself. + */ + public ApplicationDataAuthorization withRole(Role role) { + this.role = role; + return this; + } + + /** + * Get the resourceTypes property: The resource types from the defined resource types in the provider namespace that + * the application can access. If no resource types are specified and the role is service owner, the default is * + * which is all resource types. + * + * @return the resourceTypes value. + */ + public List resourceTypes() { + return this.resourceTypes; + } + + /** + * Set the resourceTypes property: The resource types from the defined resource types in the provider namespace that + * the application can access. If no resource types are specified and the role is service owner, the default is * + * which is all resource types. + * + * @param resourceTypes the resourceTypes value to set. + * @return the ApplicationDataAuthorization object itself. + */ + public ApplicationDataAuthorization withResourceTypes(List resourceTypes) { + this.resourceTypes = resourceTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (role() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property role in model ApplicationDataAuthorization")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationDataAuthorization.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString()); + jsonWriter.writeArrayField("resourceTypes", this.resourceTypes, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationDataAuthorization from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationDataAuthorization 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 ApplicationDataAuthorization. + */ + public static ApplicationDataAuthorization fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationDataAuthorization deserializedApplicationDataAuthorization = new ApplicationDataAuthorization(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("role".equals(fieldName)) { + deserializedApplicationDataAuthorization.role = Role.fromString(reader.getString()); + } else if ("resourceTypes".equals(fieldName)) { + List resourceTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedApplicationDataAuthorization.resourceTypes = resourceTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationDataAuthorization; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationProviderAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationProviderAuthorization.java new file mode 100644 index 000000000000..7c13ebe1aa4a --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ApplicationProviderAuthorization.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ApplicationProviderAuthorization model. + */ +@Fluent +public final class ApplicationProviderAuthorization implements JsonSerializable { + /* + * The role definition ID for the application. + */ + private String roleDefinitionId; + + /* + * The managed by role definition ID for the application. + */ + private String managedByRoleDefinitionId; + + /** + * Creates an instance of ApplicationProviderAuthorization class. + */ + public ApplicationProviderAuthorization() { + } + + /** + * Get the roleDefinitionId property: The role definition ID for the application. + * + * @return the roleDefinitionId value. + */ + public String roleDefinitionId() { + return this.roleDefinitionId; + } + + /** + * Set the roleDefinitionId property: The role definition ID for the application. + * + * @param roleDefinitionId the roleDefinitionId value to set. + * @return the ApplicationProviderAuthorization object itself. + */ + public ApplicationProviderAuthorization withRoleDefinitionId(String roleDefinitionId) { + this.roleDefinitionId = roleDefinitionId; + return this; + } + + /** + * Get the managedByRoleDefinitionId property: The managed by role definition ID for the application. + * + * @return the managedByRoleDefinitionId value. + */ + public String managedByRoleDefinitionId() { + return this.managedByRoleDefinitionId; + } + + /** + * Set the managedByRoleDefinitionId property: The managed by role definition ID for the application. + * + * @param managedByRoleDefinitionId the managedByRoleDefinitionId value to set. + * @return the ApplicationProviderAuthorization object itself. + */ + public ApplicationProviderAuthorization withManagedByRoleDefinitionId(String managedByRoleDefinitionId) { + this.managedByRoleDefinitionId = managedByRoleDefinitionId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("roleDefinitionId", this.roleDefinitionId); + jsonWriter.writeStringField("managedByRoleDefinitionId", this.managedByRoleDefinitionId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ApplicationProviderAuthorization from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ApplicationProviderAuthorization 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 ApplicationProviderAuthorization. + */ + public static ApplicationProviderAuthorization fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ApplicationProviderAuthorization deserializedApplicationProviderAuthorization + = new ApplicationProviderAuthorization(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("roleDefinitionId".equals(fieldName)) { + deserializedApplicationProviderAuthorization.roleDefinitionId = reader.getString(); + } else if ("managedByRoleDefinitionId".equals(fieldName)) { + deserializedApplicationProviderAuthorization.managedByRoleDefinitionId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedApplicationProviderAuthorization; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncOperationPollingRules.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncOperationPollingRules.java new file mode 100644 index 000000000000..f1c82ccb2c4d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncOperationPollingRules.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The AsyncOperationPollingRules model. + */ +@Fluent +public final class AsyncOperationPollingRules implements JsonSerializable { + /* + * The authorization actions. + */ + private List authorizationActions; + + /* + * The additional options. + */ + private AdditionalOptionsAsyncOperation additionalOptions; + + /** + * Creates an instance of AsyncOperationPollingRules class. + */ + public AsyncOperationPollingRules() { + } + + /** + * Get the authorizationActions property: The authorization actions. + * + * @return the authorizationActions value. + */ + public List authorizationActions() { + return this.authorizationActions; + } + + /** + * Set the authorizationActions property: The authorization actions. + * + * @param authorizationActions the authorizationActions value to set. + * @return the AsyncOperationPollingRules object itself. + */ + public AsyncOperationPollingRules withAuthorizationActions(List authorizationActions) { + this.authorizationActions = authorizationActions; + return this; + } + + /** + * Get the additionalOptions property: The additional options. + * + * @return the additionalOptions value. + */ + public AdditionalOptionsAsyncOperation additionalOptions() { + return this.additionalOptions; + } + + /** + * Set the additionalOptions property: The additional options. + * + * @param additionalOptions the additionalOptions value to set. + * @return the AsyncOperationPollingRules object itself. + */ + public AsyncOperationPollingRules withAdditionalOptions(AdditionalOptionsAsyncOperation additionalOptions) { + this.additionalOptions = additionalOptions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("authorizationActions", this.authorizationActions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("additionalOptions", + this.additionalOptions == null ? null : this.additionalOptions.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AsyncOperationPollingRules from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AsyncOperationPollingRules 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 AsyncOperationPollingRules. + */ + public static AsyncOperationPollingRules fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AsyncOperationPollingRules deserializedAsyncOperationPollingRules = new AsyncOperationPollingRules(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authorizationActions".equals(fieldName)) { + List authorizationActions = reader.readArray(reader1 -> reader1.getString()); + deserializedAsyncOperationPollingRules.authorizationActions = authorizationActions; + } else if ("additionalOptions".equals(fieldName)) { + deserializedAsyncOperationPollingRules.additionalOptions + = AdditionalOptionsAsyncOperation.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAsyncOperationPollingRules; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncTimeoutRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncTimeoutRule.java new file mode 100644 index 000000000000..f7c04f440f57 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AsyncTimeoutRule.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AsyncTimeoutRule model. + */ +@Fluent +public final class AsyncTimeoutRule implements JsonSerializable { + /* + * The actionName property. + */ + private String actionName; + + /* + * This is a TimeSpan property + */ + private String timeout; + + /** + * Creates an instance of AsyncTimeoutRule class. + */ + public AsyncTimeoutRule() { + } + + /** + * Get the actionName property: The actionName property. + * + * @return the actionName value. + */ + public String actionName() { + return this.actionName; + } + + /** + * Set the actionName property: The actionName property. + * + * @param actionName the actionName value to set. + * @return the AsyncTimeoutRule object itself. + */ + public AsyncTimeoutRule withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get the timeout property: This is a TimeSpan property. + * + * @return the timeout value. + */ + public String timeout() { + return this.timeout; + } + + /** + * Set the timeout property: This is a TimeSpan property. + * + * @param timeout the timeout value to set. + * @return the AsyncTimeoutRule object itself. + */ + public AsyncTimeoutRule withTimeout(String timeout) { + this.timeout = timeout; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("actionName", this.actionName); + jsonWriter.writeStringField("timeout", this.timeout); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AsyncTimeoutRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AsyncTimeoutRule 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 AsyncTimeoutRule. + */ + public static AsyncTimeoutRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AsyncTimeoutRule deserializedAsyncTimeoutRule = new AsyncTimeoutRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionName".equals(fieldName)) { + deserializedAsyncTimeoutRule.actionName = reader.getString(); + } else if ("timeout".equals(fieldName)) { + deserializedAsyncTimeoutRule.timeout = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAsyncTimeoutRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthenticationScheme.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthenticationScheme.java new file mode 100644 index 000000000000..7c069b913a79 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthenticationScheme.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The authentication scheme. + */ +public final class AuthenticationScheme extends ExpandableStringEnum { + /** + * Static value PoP for AuthenticationScheme. + */ + public static final AuthenticationScheme POP = fromString("PoP"); + + /** + * Static value Bearer for AuthenticationScheme. + */ + public static final AuthenticationScheme BEARER = fromString("Bearer"); + + /** + * Creates a new instance of AuthenticationScheme value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AuthenticationScheme() { + } + + /** + * Creates or finds a AuthenticationScheme from its string representation. + * + * @param name a name to look for. + * @return the corresponding AuthenticationScheme. + */ + public static AuthenticationScheme fromString(String name) { + return fromString(name, AuthenticationScheme.class); + } + + /** + * Gets known AuthenticationScheme values. + * + * @return known AuthenticationScheme values. + */ + public static Collection values() { + return values(AuthenticationScheme.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizationActionMapping.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizationActionMapping.java index eb1e68ac8d1b..c330fe38899f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizationActionMapping.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizationActionMapping.java @@ -17,12 +17,12 @@ @Fluent public final class AuthorizationActionMapping implements JsonSerializable { /* - * The original property. + * The original action name. */ private String original; /* - * The desired property. + * The desired action name. */ private String desired; @@ -33,7 +33,7 @@ public AuthorizationActionMapping() { } /** - * Get the original property: The original property. + * Get the original property: The original action name. * * @return the original value. */ @@ -42,7 +42,7 @@ public String original() { } /** - * Set the original property: The original property. + * Set the original property: The original action name. * * @param original the original value to set. * @return the AuthorizationActionMapping object itself. @@ -53,7 +53,7 @@ public AuthorizationActionMapping withOriginal(String original) { } /** - * Get the desired property: The desired property. + * Get the desired property: The desired action name. * * @return the desired value. */ @@ -62,7 +62,7 @@ public String desired() { } /** - * Set the desired property: The desired property. + * Set the desired property: The desired action name. * * @param desired the desired value to set. * @return the AuthorizationActionMapping object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplication.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplication.java new file mode 100644 index 000000000000..66c1f1e2965c --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplication.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.providerhub.fluent.models.AuthorizedApplicationInner; + +/** + * An immutable client-side representation of AuthorizedApplication. + */ +public interface AuthorizedApplication { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The properties property. + * + * @return the properties value. + */ + AuthorizedApplicationProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.AuthorizedApplicationInner object. + * + * @return the inner object. + */ + AuthorizedApplicationInner innerModel(); + + /** + * The entirety of the AuthorizedApplication definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AuthorizedApplication definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AuthorizedApplication definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AuthorizedApplication definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies providerNamespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @return the next definition stage. + */ + WithCreate withExistingProviderRegistration(String providerNamespace); + } + + /** + * The stage of the AuthorizedApplication definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + AuthorizedApplication create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AuthorizedApplication create(Context context); + } + + /** + * The stage of the AuthorizedApplication definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + WithCreate withProperties(AuthorizedApplicationProperties properties); + } + } + + /** + * Begins update for the AuthorizedApplication resource. + * + * @return the stage of resource update. + */ + AuthorizedApplication.Update update(); + + /** + * The template for AuthorizedApplication update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AuthorizedApplication apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AuthorizedApplication apply(Context context); + } + + /** + * The AuthorizedApplication update stages. + */ + interface UpdateStages { + /** + * The stage of the AuthorizedApplication update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + Update withProperties(AuthorizedApplicationProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AuthorizedApplication refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AuthorizedApplication refresh(Context context); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationArrayResponseWithContinuation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationArrayResponseWithContinuation.java new file mode 100644 index 000000000000..0de63439de8c --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationArrayResponseWithContinuation.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.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.providerhub.fluent.models.AuthorizedApplicationInner; +import java.io.IOException; +import java.util.List; + +/** + * The AuthorizedApplicationArrayResponseWithContinuation model. + */ +@Fluent +public final class AuthorizedApplicationArrayResponseWithContinuation + implements JsonSerializable { + /* + * The value. + */ + private List value; + + /* + * The URL to get to the next set of results, if there are any. + */ + private String nextLink; + + /** + * Creates an instance of AuthorizedApplicationArrayResponseWithContinuation class. + */ + public AuthorizedApplicationArrayResponseWithContinuation() { + } + + /** + * Get the value property: The value. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value. + * + * @param value the value value to set. + * @return the AuthorizedApplicationArrayResponseWithContinuation object itself. + */ + public AuthorizedApplicationArrayResponseWithContinuation withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get to the next set of results, if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL to get to the next set of results, if there are any. + * + * @param nextLink the nextLink value to set. + * @return the AuthorizedApplicationArrayResponseWithContinuation object itself. + */ + public AuthorizedApplicationArrayResponseWithContinuation withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + 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 AuthorizedApplicationArrayResponseWithContinuation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthorizedApplicationArrayResponseWithContinuation 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 AuthorizedApplicationArrayResponseWithContinuation. + */ + public static AuthorizedApplicationArrayResponseWithContinuation fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AuthorizedApplicationArrayResponseWithContinuation deserializedAuthorizedApplicationArrayResponseWithContinuation + = new AuthorizedApplicationArrayResponseWithContinuation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AuthorizedApplicationInner.fromJson(reader1)); + deserializedAuthorizedApplicationArrayResponseWithContinuation.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAuthorizedApplicationArrayResponseWithContinuation.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthorizedApplicationArrayResponseWithContinuation; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationProperties.java new file mode 100644 index 000000000000..b9309b11c84d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplicationProperties.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The AuthorizedApplicationProperties model. + */ +@Fluent +public final class AuthorizedApplicationProperties implements JsonSerializable { + /* + * The providerAuthorization property. + */ + private ApplicationProviderAuthorization providerAuthorization; + + /* + * The authorizations that determine the level of data access permissions on the specified resource types. + */ + private List dataAuthorizations; + + /* + * The provisioning state. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of AuthorizedApplicationProperties class. + */ + public AuthorizedApplicationProperties() { + } + + /** + * Get the providerAuthorization property: The providerAuthorization property. + * + * @return the providerAuthorization value. + */ + public ApplicationProviderAuthorization providerAuthorization() { + return this.providerAuthorization; + } + + /** + * Set the providerAuthorization property: The providerAuthorization property. + * + * @param providerAuthorization the providerAuthorization value to set. + * @return the AuthorizedApplicationProperties object itself. + */ + public AuthorizedApplicationProperties + withProviderAuthorization(ApplicationProviderAuthorization providerAuthorization) { + this.providerAuthorization = providerAuthorization; + return this; + } + + /** + * Get the dataAuthorizations property: The authorizations that determine the level of data access permissions on + * the specified resource types. + * + * @return the dataAuthorizations value. + */ + public List dataAuthorizations() { + return this.dataAuthorizations; + } + + /** + * Set the dataAuthorizations property: The authorizations that determine the level of data access permissions on + * the specified resource types. + * + * @param dataAuthorizations the dataAuthorizations value to set. + * @return the AuthorizedApplicationProperties object itself. + */ + public AuthorizedApplicationProperties + withDataAuthorizations(List dataAuthorizations) { + this.dataAuthorizations = dataAuthorizations; + return this; + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (providerAuthorization() != null) { + providerAuthorization().validate(); + } + if (dataAuthorizations() != null) { + dataAuthorizations().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("providerAuthorization", this.providerAuthorization); + jsonWriter.writeArrayField("dataAuthorizations", this.dataAuthorizations, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthorizedApplicationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthorizedApplicationProperties 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 AuthorizedApplicationProperties. + */ + public static AuthorizedApplicationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthorizedApplicationProperties deserializedAuthorizedApplicationProperties + = new AuthorizedApplicationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("providerAuthorization".equals(fieldName)) { + deserializedAuthorizedApplicationProperties.providerAuthorization + = ApplicationProviderAuthorization.fromJson(reader); + } else if ("dataAuthorizations".equals(fieldName)) { + List dataAuthorizations + = reader.readArray(reader1 -> ApplicationDataAuthorization.fromJson(reader1)); + deserializedAuthorizedApplicationProperties.dataAuthorizations = dataAuthorizations; + } else if ("provisioningState".equals(fieldName)) { + deserializedAuthorizedApplicationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthorizedApplicationProperties; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplications.java new file mode 100644 index 000000000000..727aacee17ef --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AuthorizedApplications.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.UUID; + +/** + * Resource collection API of AuthorizedApplications. + */ +public interface AuthorizedApplications { + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details along with {@link Response}. + */ + Response getWithResponse(String providerNamespace, UUID applicationId, Context context); + + /** + * Gets the authorized application details. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details. + */ + AuthorizedApplication get(String providerNamespace, UUID applicationId); + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String providerNamespace, UUID applicationId, Context context); + + /** + * Deletes an authorized application. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param applicationId The application ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String providerNamespace, UUID applicationId); + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String providerNamespace); + + /** + * Gets the list of the authorized applications in the provider namespace. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the authorized applications in the provider namespace as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String providerNamespace, Context context); + + /** + * Gets the authorized application details. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details along with {@link Response}. + */ + AuthorizedApplication getById(String id); + + /** + * Gets the authorized application details. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the authorized application details along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes an authorized application. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes an authorized application. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AuthorizedApplication resource. + * + * @param name resource name. + * @return the first stage of the new AuthorizedApplication definition. + */ + AuthorizedApplication.DefinitionStages.Blank define(UUID name); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailabilityZonePolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailabilityZonePolicy.java new file mode 100644 index 000000000000..7fceef29a168 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailabilityZonePolicy.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for AvailabilityZonePolicy. + */ +public final class AvailabilityZonePolicy extends ExpandableStringEnum { + /** + * Static value NotSpecified for AvailabilityZonePolicy. + */ + public static final AvailabilityZonePolicy NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value SingleZoned for AvailabilityZonePolicy. + */ + public static final AvailabilityZonePolicy SINGLE_ZONED = fromString("SingleZoned"); + + /** + * Static value MultiZoned for AvailabilityZonePolicy. + */ + public static final AvailabilityZonePolicy MULTI_ZONED = fromString("MultiZoned"); + + /** + * Creates a new instance of AvailabilityZonePolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AvailabilityZonePolicy() { + } + + /** + * Creates or finds a AvailabilityZonePolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding AvailabilityZonePolicy. + */ + public static AvailabilityZonePolicy fromString(String name) { + return fromString(name, AvailabilityZonePolicy.class); + } + + /** + * Gets known AvailabilityZonePolicy values. + * + * @return known AvailabilityZonePolicy values. + */ + public static Collection values() { + return values(AvailabilityZonePolicy.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailableCheckInManifestEnvironment.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailableCheckInManifestEnvironment.java new file mode 100644 index 000000000000..060827b3466f --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/AvailableCheckInManifestEnvironment.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The environment type. + */ +public final class AvailableCheckInManifestEnvironment + extends ExpandableStringEnum { + /** + * Static value NotSpecified for AvailableCheckInManifestEnvironment. + */ + public static final AvailableCheckInManifestEnvironment NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Canary for AvailableCheckInManifestEnvironment. + */ + public static final AvailableCheckInManifestEnvironment CANARY = fromString("Canary"); + + /** + * Static value Prod for AvailableCheckInManifestEnvironment. + */ + public static final AvailableCheckInManifestEnvironment PROD = fromString("Prod"); + + /** + * Static value All for AvailableCheckInManifestEnvironment. + */ + public static final AvailableCheckInManifestEnvironment ALL = fromString("All"); + + /** + * Static value Mooncake for AvailableCheckInManifestEnvironment. + */ + public static final AvailableCheckInManifestEnvironment MOONCAKE = fromString("Mooncake"); + + /** + * Static value Fairfax for AvailableCheckInManifestEnvironment. + */ + public static final AvailableCheckInManifestEnvironment FAIRFAX = fromString("Fairfax"); + + /** + * Creates a new instance of AvailableCheckInManifestEnvironment value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AvailableCheckInManifestEnvironment() { + } + + /** + * Creates or finds a AvailableCheckInManifestEnvironment from its string representation. + * + * @param name a name to look for. + * @return the corresponding AvailableCheckInManifestEnvironment. + */ + public static AvailableCheckInManifestEnvironment fromString(String name) { + return fromString(name, AvailableCheckInManifestEnvironment.class); + } + + /** + * Gets known AvailableCheckInManifestEnvironment values. + * + * @return known AvailableCheckInManifestEnvironment values. + */ + public static Collection values() { + return values(AvailableCheckInManifestEnvironment.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/BlockActionVerb.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/BlockActionVerb.java new file mode 100644 index 000000000000..41437efce69f --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/BlockActionVerb.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The action verb that will be blocked when the resource group is locked during move. + */ +public final class BlockActionVerb extends ExpandableStringEnum { + /** + * Static value NotSpecified for BlockActionVerb. + */ + public static final BlockActionVerb NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Read for BlockActionVerb. + */ + public static final BlockActionVerb READ = fromString("Read"); + + /** + * Static value Write for BlockActionVerb. + */ + public static final BlockActionVerb WRITE = fromString("Write"); + + /** + * Static value Action for BlockActionVerb. + */ + public static final BlockActionVerb ACTION = fromString("Action"); + + /** + * Static value Delete for BlockActionVerb. + */ + public static final BlockActionVerb DELETE = fromString("Delete"); + + /** + * Static value Unrecognized for BlockActionVerb. + */ + public static final BlockActionVerb UNRECOGNIZED = fromString("Unrecognized"); + + /** + * Creates a new instance of BlockActionVerb value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BlockActionVerb() { + } + + /** + * Creates or finds a BlockActionVerb from its string representation. + * + * @param name a name to look for. + * @return the corresponding BlockActionVerb. + */ + public static BlockActionVerb fromString(String name) { + return fromString(name, BlockActionVerb.class); + } + + /** + * Gets known BlockActionVerb values. + * + * @return known BlockActionVerb values. + */ + public static Collection values() { + return values(BlockActionVerb.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CanaryTrafficRegionRolloutConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CanaryTrafficRegionRolloutConfiguration.java index 68cef27a2030..57f3163e6fe1 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CanaryTrafficRegionRolloutConfiguration.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CanaryTrafficRegionRolloutConfiguration.java @@ -19,12 +19,12 @@ public class CanaryTrafficRegionRolloutConfiguration implements JsonSerializable { /* - * The skipRegions property. + * The skip regions. */ private List skipRegions; /* - * The regions property. + * The regions. */ private List regions; @@ -35,7 +35,7 @@ public CanaryTrafficRegionRolloutConfiguration() { } /** - * Get the skipRegions property: The skipRegions property. + * Get the skipRegions property: The skip regions. * * @return the skipRegions value. */ @@ -44,7 +44,7 @@ public List skipRegions() { } /** - * Set the skipRegions property: The skipRegions property. + * Set the skipRegions property: The skip regions. * * @param skipRegions the skipRegions value to set. * @return the CanaryTrafficRegionRolloutConfiguration object itself. @@ -55,7 +55,7 @@ public CanaryTrafficRegionRolloutConfiguration withSkipRegions(List skip } /** - * Get the regions property: The regions property. + * Get the regions property: The regions. * * @return the regions value. */ @@ -64,7 +64,7 @@ public List regions() { } /** - * Set the regions property: The regions property. + * Set the regions property: The regions. * * @param regions the regions value to set. * @return the CanaryTrafficRegionRolloutConfiguration object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CapacityPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CapacityPolicy.java new file mode 100644 index 000000000000..30a8569d8c19 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CapacityPolicy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Capacity policy. + */ +public final class CapacityPolicy extends ExpandableStringEnum { + /** + * Static value Default for CapacityPolicy. + */ + public static final CapacityPolicy DEFAULT = fromString("Default"); + + /** + * Static value Restricted for CapacityPolicy. + */ + public static final CapacityPolicy RESTRICTED = fromString("Restricted"); + + /** + * Creates a new instance of CapacityPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CapacityPolicy() { + } + + /** + * Creates or finds a CapacityPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding CapacityPolicy. + */ + public static CapacityPolicy fromString(String name) { + return fromString(name, CapacityPolicy.class); + } + + /** + * Gets known CapacityPolicy values. + * + * @return known CapacityPolicy values. + */ + public static Collection values() { + return values(CapacityPolicy.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckNameAvailabilitySpecifications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckNameAvailabilitySpecifications.java index 2be5fd2791e3..d81862bf0568 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckNameAvailabilitySpecifications.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckNameAvailabilitySpecifications.java @@ -18,12 +18,12 @@ @Fluent public class CheckNameAvailabilitySpecifications implements JsonSerializable { /* - * The enableDefaultValidation property. + * Whether default validation is enabled. */ private Boolean enableDefaultValidation; /* - * The resourceTypesWithCustomValidation property. + * The resource types with custom validation. */ private List resourceTypesWithCustomValidation; @@ -34,7 +34,7 @@ public CheckNameAvailabilitySpecifications() { } /** - * Get the enableDefaultValidation property: The enableDefaultValidation property. + * Get the enableDefaultValidation property: Whether default validation is enabled. * * @return the enableDefaultValidation value. */ @@ -43,7 +43,7 @@ public Boolean enableDefaultValidation() { } /** - * Set the enableDefaultValidation property: The enableDefaultValidation property. + * Set the enableDefaultValidation property: Whether default validation is enabled. * * @param enableDefaultValidation the enableDefaultValidation value to set. * @return the CheckNameAvailabilitySpecifications object itself. @@ -54,7 +54,7 @@ public CheckNameAvailabilitySpecifications withEnableDefaultValidation(Boolean e } /** - * Get the resourceTypesWithCustomValidation property: The resourceTypesWithCustomValidation property. + * Get the resourceTypesWithCustomValidation property: The resource types with custom validation. * * @return the resourceTypesWithCustomValidation value. */ @@ -63,7 +63,7 @@ public List resourceTypesWithCustomValidation() { } /** - * Set the resourceTypesWithCustomValidation property: The resourceTypesWithCustomValidation property. + * Set the resourceTypesWithCustomValidation property: The resource types with custom validation. * * @param resourceTypesWithCustomValidation the resourceTypesWithCustomValidation value to set. * @return the CheckNameAvailabilitySpecifications object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckinManifestInfo.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckinManifestInfo.java index 44e7b090e9ae..3fefc21c24ad 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckinManifestInfo.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CheckinManifestInfo.java @@ -11,28 +11,28 @@ */ public interface CheckinManifestInfo { /** - * Gets the isCheckedIn property: The isCheckedIn property. + * Gets the isCheckedIn property: Whether the manifest is checked in. * * @return the isCheckedIn value. */ boolean isCheckedIn(); /** - * Gets the statusMessage property: The statusMessage property. + * Gets the statusMessage property: The status message. * * @return the statusMessage value. */ String statusMessage(); /** - * Gets the pullRequest property: The pullRequest property. + * Gets the pullRequest property: The pull request. * * @return the pullRequest value. */ String pullRequest(); /** - * Gets the commitId property: The commitId property. + * Gets the commitId property: The commit id. * * @return the commitId value. */ diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CommonApiVersionsMergeMode.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CommonApiVersionsMergeMode.java new file mode 100644 index 000000000000..6a3b46222bcd --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CommonApiVersionsMergeMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Common api versions merge mode. + */ +public final class CommonApiVersionsMergeMode extends ExpandableStringEnum { + /** + * Static value Merge for CommonApiVersionsMergeMode. + */ + public static final CommonApiVersionsMergeMode MERGE = fromString("Merge"); + + /** + * Static value Overwrite for CommonApiVersionsMergeMode. + */ + public static final CommonApiVersionsMergeMode OVERWRITE = fromString("Overwrite"); + + /** + * Creates a new instance of CommonApiVersionsMergeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CommonApiVersionsMergeMode() { + } + + /** + * Creates or finds a CommonApiVersionsMergeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding CommonApiVersionsMergeMode. + */ + public static CommonApiVersionsMergeMode fromString(String name) { + return fromString(name, CommonApiVersionsMergeMode.class); + } + + /** + * Gets known CommonApiVersionsMergeMode values. + * + * @return known CommonApiVersionsMergeMode values. + */ + public static Collection values() { + return values(CommonApiVersionsMergeMode.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CrossTenantTokenValidation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CrossTenantTokenValidation.java new file mode 100644 index 000000000000..8df0cfe49055 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CrossTenantTokenValidation.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The cross tenant token validation. + */ +public final class CrossTenantTokenValidation extends ExpandableStringEnum { + /** + * Static value EnsureSecureValidation for CrossTenantTokenValidation. + */ + public static final CrossTenantTokenValidation ENSURE_SECURE_VALIDATION = fromString("EnsureSecureValidation"); + + /** + * Static value PassthroughInsecureToken for CrossTenantTokenValidation. + */ + public static final CrossTenantTokenValidation PASSTHROUGH_INSECURE_TOKEN = fromString("PassthroughInsecureToken"); + + /** + * Creates a new instance of CrossTenantTokenValidation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CrossTenantTokenValidation() { + } + + /** + * Creates or finds a CrossTenantTokenValidation from its string representation. + * + * @param name a name to look for. + * @return the corresponding CrossTenantTokenValidation. + */ + public static CrossTenantTokenValidation fromString(String name) { + return fromString(name, CrossTenantTokenValidation.class); + } + + /** + * Gets known CrossTenantTokenValidation values. + * + * @return known CrossTenantTokenValidation values. + */ + public static Collection values() { + return values(CrossTenantTokenValidation.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollout.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollout.java index f098428c29e0..90e0c17f9084 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollout.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollout.java @@ -4,6 +4,8 @@ package com.azure.resourcemanager.providerhub.models; +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.CustomRolloutInner; @@ -39,6 +41,13 @@ public interface CustomRollout { */ CustomRolloutProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.CustomRolloutInner object. * @@ -170,4 +179,23 @@ interface WithProperties { * @return the refreshed resource. */ CustomRollout refresh(Context context); + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response stopWithResponse(Context context); + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutProperties.java index e91dca4bc4d3..8c1857e1de4a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutProperties.java @@ -7,15 +7,31 @@ 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 java.io.IOException; /** - * Properties of the rollout. + * The CustomRolloutProperties model. */ @Fluent -public final class CustomRolloutProperties extends CustomRolloutPropertiesAutoGenerated { +public final class CustomRolloutProperties implements JsonSerializable { + /* + * The provisioned state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * The specification. + */ + private CustomRolloutPropertiesSpecification specification; + + /* + * The status. + */ + private CustomRolloutPropertiesStatus status; + /** * Creates an instance of CustomRolloutProperties class. */ @@ -23,29 +39,51 @@ public CustomRolloutProperties() { } /** - * {@inheritDoc} + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. */ - @Override - public CustomRolloutProperties withProvisioningState(ProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * {@inheritDoc} + * Get the specification property: The specification. + * + * @return the specification value. + */ + public CustomRolloutPropertiesSpecification specification() { + return this.specification; + } + + /** + * Set the specification property: The specification. + * + * @param specification the specification value to set. + * @return the CustomRolloutProperties object itself. */ - @Override public CustomRolloutProperties withSpecification(CustomRolloutPropertiesSpecification specification) { - super.withSpecification(specification); + this.specification = specification; return this; } /** - * {@inheritDoc} + * Get the status property: The status. + * + * @return the status value. + */ + public CustomRolloutPropertiesStatus status() { + return this.status; + } + + /** + * Set the status property: The status. + * + * @param status the status value to set. + * @return the CustomRolloutProperties object itself. */ - @Override public CustomRolloutProperties withStatus(CustomRolloutPropertiesStatus status) { - super.withStatus(status); + this.status = status; return this; } @@ -54,7 +92,6 @@ public CustomRolloutProperties withStatus(CustomRolloutPropertiesStatus status) * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (specification() == null) { throw LOGGER.atError() @@ -76,10 +113,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("specification", specification()); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); - jsonWriter.writeJsonField("status", status()); + jsonWriter.writeJsonField("specification", this.specification); + jsonWriter.writeJsonField("status", this.status); return jsonWriter.writeEndObject(); } @@ -100,13 +135,13 @@ public static CustomRolloutProperties fromJson(JsonReader jsonReader) throws IOE reader.nextToken(); if ("specification".equals(fieldName)) { - deserializedCustomRolloutProperties - .withSpecification(CustomRolloutPropertiesSpecification.fromJson(reader)); + deserializedCustomRolloutProperties.specification + = CustomRolloutPropertiesSpecification.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { - deserializedCustomRolloutProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); + deserializedCustomRolloutProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else if ("status".equals(fieldName)) { - deserializedCustomRolloutProperties.withStatus(CustomRolloutPropertiesStatus.fromJson(reader)); + deserializedCustomRolloutProperties.status = CustomRolloutPropertiesStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesAutoGenerated.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesAutoGenerated.java deleted file mode 100644 index 3666aa39f7c3..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesAutoGenerated.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The CustomRolloutPropertiesAutoGenerated model. - */ -@Fluent -public class CustomRolloutPropertiesAutoGenerated implements JsonSerializable { - /* - * The provisioningState property. - */ - private ProvisioningState provisioningState; - - /* - * The specification property. - */ - private CustomRolloutPropertiesSpecification specification; - - /* - * The status property. - */ - private CustomRolloutPropertiesStatus status; - - /** - * Creates an instance of CustomRolloutPropertiesAutoGenerated class. - */ - public CustomRolloutPropertiesAutoGenerated() { - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The provisioningState property. - * - * @param provisioningState the provisioningState value to set. - * @return the CustomRolloutPropertiesAutoGenerated object itself. - */ - public CustomRolloutPropertiesAutoGenerated withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the specification property: The specification property. - * - * @return the specification value. - */ - public CustomRolloutPropertiesSpecification specification() { - return this.specification; - } - - /** - * Set the specification property: The specification property. - * - * @param specification the specification value to set. - * @return the CustomRolloutPropertiesAutoGenerated object itself. - */ - public CustomRolloutPropertiesAutoGenerated withSpecification(CustomRolloutPropertiesSpecification specification) { - this.specification = specification; - return this; - } - - /** - * Get the status property: The status property. - * - * @return the status value. - */ - public CustomRolloutPropertiesStatus status() { - return this.status; - } - - /** - * Set the status property: The status property. - * - * @param status the status value to set. - * @return the CustomRolloutPropertiesAutoGenerated object itself. - */ - public CustomRolloutPropertiesAutoGenerated withStatus(CustomRolloutPropertiesStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (specification() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property specification in model CustomRolloutPropertiesAutoGenerated")); - } else { - specification().validate(); - } - if (status() != null) { - status().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomRolloutPropertiesAutoGenerated.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("specification", this.specification); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - jsonWriter.writeJsonField("status", this.status); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomRolloutPropertiesAutoGenerated from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomRolloutPropertiesAutoGenerated 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 CustomRolloutPropertiesAutoGenerated. - */ - public static CustomRolloutPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomRolloutPropertiesAutoGenerated deserializedCustomRolloutPropertiesAutoGenerated - = new CustomRolloutPropertiesAutoGenerated(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("specification".equals(fieldName)) { - deserializedCustomRolloutPropertiesAutoGenerated.specification - = CustomRolloutPropertiesSpecification.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedCustomRolloutPropertiesAutoGenerated.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedCustomRolloutPropertiesAutoGenerated.status - = CustomRolloutPropertiesStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomRolloutPropertiesAutoGenerated; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesSpecification.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesSpecification.java index dc542c9b05d1..7da6f37f112a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesSpecification.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesSpecification.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.providerhub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +13,7 @@ import java.util.List; /** - * The CustomRolloutPropertiesSpecification model. + * The specification. */ @Fluent public final class CustomRolloutPropertiesSpecification extends CustomRolloutSpecification { @@ -24,6 +23,16 @@ public final class CustomRolloutPropertiesSpecification extends CustomRolloutSpe public CustomRolloutPropertiesSpecification() { } + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutPropertiesSpecification + withAutoProvisionConfig(CustomRolloutSpecificationAutoProvisionConfig autoProvisionConfig) { + super.withAutoProvisionConfig(autoProvisionConfig); + return this; + } + /** * {@inheritDoc} */ @@ -33,6 +42,34 @@ public CustomRolloutPropertiesSpecification withCanary(CustomRolloutSpecificatio return this; } + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutPropertiesSpecification withReleaseScopes(List releaseScopes) { + super.withReleaseScopes(releaseScopes); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutPropertiesSpecification + withRefreshSubscriptionRegistration(Boolean refreshSubscriptionRegistration) { + super.withRefreshSubscriptionRegistration(refreshSubscriptionRegistration); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutPropertiesSpecification withSkipReleaseScopeValidation(Boolean skipReleaseScopeValidation) { + super.withSkipReleaseScopeValidation(skipReleaseScopeValidation); + return this; + } + /** * {@inheritDoc} */ @@ -60,11 +97,10 @@ public CustomRolloutPropertiesSpecification withCanary(CustomRolloutSpecificatio */ @Override public void validate() { - if (canary() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property canary in model CustomRolloutPropertiesSpecification")); - } else { + if (autoProvisionConfig() != null) { + autoProvisionConfig().validate(); + } + if (canary() != null) { canary().validate(); } if (providerRegistration() != null) { @@ -75,15 +111,17 @@ public void validate() { } } - private static final ClientLogger LOGGER = new ClientLogger(CustomRolloutPropertiesSpecification.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("autoProvisionConfig", autoProvisionConfig()); jsonWriter.writeJsonField("canary", canary()); + jsonWriter.writeArrayField("releaseScopes", releaseScopes(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("refreshSubscriptionRegistration", refreshSubscriptionRegistration()); + jsonWriter.writeBooleanField("skipReleaseScopeValidation", skipReleaseScopeValidation()); jsonWriter.writeJsonField("providerRegistration", providerRegistration()); jsonWriter.writeArrayField("resourceTypeRegistrations", resourceTypeRegistrations(), (writer, element) -> writer.writeJson(element)); @@ -96,7 +134,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CustomRolloutPropertiesSpecification 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 CustomRolloutPropertiesSpecification. */ public static CustomRolloutPropertiesSpecification fromJson(JsonReader jsonReader) throws IOException { @@ -107,9 +144,21 @@ public static CustomRolloutPropertiesSpecification fromJson(JsonReader jsonReade String fieldName = reader.getFieldName(); reader.nextToken(); - if ("canary".equals(fieldName)) { + if ("autoProvisionConfig".equals(fieldName)) { + deserializedCustomRolloutPropertiesSpecification + .withAutoProvisionConfig(CustomRolloutSpecificationAutoProvisionConfig.fromJson(reader)); + } else if ("canary".equals(fieldName)) { deserializedCustomRolloutPropertiesSpecification .withCanary(CustomRolloutSpecificationCanary.fromJson(reader)); + } else if ("releaseScopes".equals(fieldName)) { + List releaseScopes = reader.readArray(reader1 -> reader1.getString()); + deserializedCustomRolloutPropertiesSpecification.withReleaseScopes(releaseScopes); + } else if ("refreshSubscriptionRegistration".equals(fieldName)) { + deserializedCustomRolloutPropertiesSpecification + .withRefreshSubscriptionRegistration(reader.getNullable(JsonReader::getBoolean)); + } else if ("skipReleaseScopeValidation".equals(fieldName)) { + deserializedCustomRolloutPropertiesSpecification + .withSkipReleaseScopeValidation(reader.getNullable(JsonReader::getBoolean)); } else if ("providerRegistration".equals(fieldName)) { deserializedCustomRolloutPropertiesSpecification .withProviderRegistration(CustomRolloutSpecificationProviderRegistration.fromJson(reader)); diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesStatus.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesStatus.java index 9d1f7dba6ab3..c4701c7e094c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesStatus.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutPropertiesStatus.java @@ -13,7 +13,7 @@ import java.util.Map; /** - * The CustomRolloutPropertiesStatus model. + * The status. */ @Fluent public final class CustomRolloutPropertiesStatus extends CustomRolloutStatus { @@ -42,6 +42,16 @@ public CustomRolloutPropertiesStatus withCompletedRegions(List completed return this; } + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutPropertiesStatus + withManifestCheckinStatus(CustomRolloutStatusManifestCheckinStatus manifestCheckinStatus) { + super.withManifestCheckinStatus(manifestCheckinStatus); + return this; + } + /** * Validates the instance. * @@ -56,6 +66,9 @@ public void validate() { } }); } + if (manifestCheckinStatus() != null) { + manifestCheckinStatus().validate(); + } } /** @@ -68,6 +81,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("failedOrSkippedRegions", failedOrSkippedRegions(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("manifestCheckinStatus", manifestCheckinStatus()); return jsonWriter.writeEndObject(); } @@ -94,6 +108,9 @@ public static CustomRolloutPropertiesStatus fromJson(JsonReader jsonReader) thro Map failedOrSkippedRegions = reader.readMap(reader1 -> ExtendedErrorInfo.fromJson(reader1)); deserializedCustomRolloutPropertiesStatus.withFailedOrSkippedRegions(failedOrSkippedRegions); + } else if ("manifestCheckinStatus".equals(fieldName)) { + deserializedCustomRolloutPropertiesStatus + .withManifestCheckinStatus(CustomRolloutStatusManifestCheckinStatus.fromJson(reader)); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecification.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecification.java index 76911010adba..e92594b6d3d3 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecification.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecification.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.providerhub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,17 +19,37 @@ @Fluent public class CustomRolloutSpecification implements JsonSerializable { /* - * The canary property. + * The auto provisioning configuration. + */ + private CustomRolloutSpecificationAutoProvisionConfig autoProvisionConfig; + + /* + * The canary region configuration. */ private CustomRolloutSpecificationCanary canary; /* - * The providerRegistration property. + * The release scopes. + */ + private List releaseScopes; + + /* + * Whether refreshing subscription registration is enabled or disabled. + */ + private Boolean refreshSubscriptionRegistration; + + /* + * Whether release scope validation should be skipped. + */ + private Boolean skipReleaseScopeValidation; + + /* + * The provider registration. */ private CustomRolloutSpecificationProviderRegistration providerRegistration; /* - * The resourceTypeRegistrations property. + * The resource type registrations. */ private List resourceTypeRegistrations; @@ -41,7 +60,28 @@ public CustomRolloutSpecification() { } /** - * Get the canary property: The canary property. + * Get the autoProvisionConfig property: The auto provisioning configuration. + * + * @return the autoProvisionConfig value. + */ + public CustomRolloutSpecificationAutoProvisionConfig autoProvisionConfig() { + return this.autoProvisionConfig; + } + + /** + * Set the autoProvisionConfig property: The auto provisioning configuration. + * + * @param autoProvisionConfig the autoProvisionConfig value to set. + * @return the CustomRolloutSpecification object itself. + */ + public CustomRolloutSpecification + withAutoProvisionConfig(CustomRolloutSpecificationAutoProvisionConfig autoProvisionConfig) { + this.autoProvisionConfig = autoProvisionConfig; + return this; + } + + /** + * Get the canary property: The canary region configuration. * * @return the canary value. */ @@ -50,7 +90,7 @@ public CustomRolloutSpecificationCanary canary() { } /** - * Set the canary property: The canary property. + * Set the canary property: The canary region configuration. * * @param canary the canary value to set. * @return the CustomRolloutSpecification object itself. @@ -61,7 +101,69 @@ public CustomRolloutSpecification withCanary(CustomRolloutSpecificationCanary ca } /** - * Get the providerRegistration property: The providerRegistration property. + * Get the releaseScopes property: The release scopes. + * + * @return the releaseScopes value. + */ + public List releaseScopes() { + return this.releaseScopes; + } + + /** + * Set the releaseScopes property: The release scopes. + * + * @param releaseScopes the releaseScopes value to set. + * @return the CustomRolloutSpecification object itself. + */ + public CustomRolloutSpecification withReleaseScopes(List releaseScopes) { + this.releaseScopes = releaseScopes; + return this; + } + + /** + * Get the refreshSubscriptionRegistration property: Whether refreshing subscription registration is enabled or + * disabled. + * + * @return the refreshSubscriptionRegistration value. + */ + public Boolean refreshSubscriptionRegistration() { + return this.refreshSubscriptionRegistration; + } + + /** + * Set the refreshSubscriptionRegistration property: Whether refreshing subscription registration is enabled or + * disabled. + * + * @param refreshSubscriptionRegistration the refreshSubscriptionRegistration value to set. + * @return the CustomRolloutSpecification object itself. + */ + public CustomRolloutSpecification withRefreshSubscriptionRegistration(Boolean refreshSubscriptionRegistration) { + this.refreshSubscriptionRegistration = refreshSubscriptionRegistration; + return this; + } + + /** + * Get the skipReleaseScopeValidation property: Whether release scope validation should be skipped. + * + * @return the skipReleaseScopeValidation value. + */ + public Boolean skipReleaseScopeValidation() { + return this.skipReleaseScopeValidation; + } + + /** + * Set the skipReleaseScopeValidation property: Whether release scope validation should be skipped. + * + * @param skipReleaseScopeValidation the skipReleaseScopeValidation value to set. + * @return the CustomRolloutSpecification object itself. + */ + public CustomRolloutSpecification withSkipReleaseScopeValidation(Boolean skipReleaseScopeValidation) { + this.skipReleaseScopeValidation = skipReleaseScopeValidation; + return this; + } + + /** + * Get the providerRegistration property: The provider registration. * * @return the providerRegistration value. */ @@ -70,7 +172,7 @@ public CustomRolloutSpecificationProviderRegistration providerRegistration() { } /** - * Set the providerRegistration property: The providerRegistration property. + * Set the providerRegistration property: The provider registration. * * @param providerRegistration the providerRegistration value to set. * @return the CustomRolloutSpecification object itself. @@ -82,7 +184,7 @@ public CustomRolloutSpecificationProviderRegistration providerRegistration() { } /** - * Get the resourceTypeRegistrations property: The resourceTypeRegistrations property. + * Get the resourceTypeRegistrations property: The resource type registrations. * * @return the resourceTypeRegistrations value. */ @@ -91,7 +193,7 @@ public List resourceTypeRegistrations() { } /** - * Set the resourceTypeRegistrations property: The resourceTypeRegistrations property. + * Set the resourceTypeRegistrations property: The resource type registrations. * * @param resourceTypeRegistrations the resourceTypeRegistrations value to set. * @return the CustomRolloutSpecification object itself. @@ -108,11 +210,10 @@ public List resourceTypeRegistrations() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (canary() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property canary in model CustomRolloutSpecification")); - } else { + if (autoProvisionConfig() != null) { + autoProvisionConfig().validate(); + } + if (canary() != null) { canary().validate(); } if (providerRegistration() != null) { @@ -123,15 +224,18 @@ public void validate() { } } - private static final ClientLogger LOGGER = new ClientLogger(CustomRolloutSpecification.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("autoProvisionConfig", this.autoProvisionConfig); jsonWriter.writeJsonField("canary", this.canary); + jsonWriter.writeArrayField("releaseScopes", this.releaseScopes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("refreshSubscriptionRegistration", this.refreshSubscriptionRegistration); + jsonWriter.writeBooleanField("skipReleaseScopeValidation", this.skipReleaseScopeValidation); jsonWriter.writeJsonField("providerRegistration", this.providerRegistration); jsonWriter.writeArrayField("resourceTypeRegistrations", this.resourceTypeRegistrations, (writer, element) -> writer.writeJson(element)); @@ -144,7 +248,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CustomRolloutSpecification 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 CustomRolloutSpecification. */ public static CustomRolloutSpecification fromJson(JsonReader jsonReader) throws IOException { @@ -154,8 +257,20 @@ public static CustomRolloutSpecification fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("canary".equals(fieldName)) { + if ("autoProvisionConfig".equals(fieldName)) { + deserializedCustomRolloutSpecification.autoProvisionConfig + = CustomRolloutSpecificationAutoProvisionConfig.fromJson(reader); + } else if ("canary".equals(fieldName)) { deserializedCustomRolloutSpecification.canary = CustomRolloutSpecificationCanary.fromJson(reader); + } else if ("releaseScopes".equals(fieldName)) { + List releaseScopes = reader.readArray(reader1 -> reader1.getString()); + deserializedCustomRolloutSpecification.releaseScopes = releaseScopes; + } else if ("refreshSubscriptionRegistration".equals(fieldName)) { + deserializedCustomRolloutSpecification.refreshSubscriptionRegistration + = reader.getNullable(JsonReader::getBoolean); + } else if ("skipReleaseScopeValidation".equals(fieldName)) { + deserializedCustomRolloutSpecification.skipReleaseScopeValidation + = reader.getNullable(JsonReader::getBoolean); } else if ("providerRegistration".equals(fieldName)) { deserializedCustomRolloutSpecification.providerRegistration = CustomRolloutSpecificationProviderRegistration.fromJson(reader); diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationAutoProvisionConfig.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationAutoProvisionConfig.java new file mode 100644 index 000000000000..a2d0eb7cd550 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationAutoProvisionConfig.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The auto provisioning configuration. + */ +@Fluent +public final class CustomRolloutSpecificationAutoProvisionConfig + implements JsonSerializable { + /* + * The storage property. + */ + private Boolean storage; + + /* + * The resourceGraph property. + */ + private Boolean resourceGraph; + + /** + * Creates an instance of CustomRolloutSpecificationAutoProvisionConfig class. + */ + public CustomRolloutSpecificationAutoProvisionConfig() { + } + + /** + * Get the storage property: The storage property. + * + * @return the storage value. + */ + public Boolean storage() { + return this.storage; + } + + /** + * Set the storage property: The storage property. + * + * @param storage the storage value to set. + * @return the CustomRolloutSpecificationAutoProvisionConfig object itself. + */ + public CustomRolloutSpecificationAutoProvisionConfig withStorage(Boolean storage) { + this.storage = storage; + return this; + } + + /** + * Get the resourceGraph property: The resourceGraph property. + * + * @return the resourceGraph value. + */ + public Boolean resourceGraph() { + return this.resourceGraph; + } + + /** + * Set the resourceGraph property: The resourceGraph property. + * + * @param resourceGraph the resourceGraph value to set. + * @return the CustomRolloutSpecificationAutoProvisionConfig object itself. + */ + public CustomRolloutSpecificationAutoProvisionConfig withResourceGraph(Boolean resourceGraph) { + this.resourceGraph = resourceGraph; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("storage", this.storage); + jsonWriter.writeBooleanField("resourceGraph", this.resourceGraph); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomRolloutSpecificationAutoProvisionConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomRolloutSpecificationAutoProvisionConfig 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 CustomRolloutSpecificationAutoProvisionConfig. + */ + public static CustomRolloutSpecificationAutoProvisionConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomRolloutSpecificationAutoProvisionConfig deserializedCustomRolloutSpecificationAutoProvisionConfig + = new CustomRolloutSpecificationAutoProvisionConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storage".equals(fieldName)) { + deserializedCustomRolloutSpecificationAutoProvisionConfig.storage + = reader.getNullable(JsonReader::getBoolean); + } else if ("resourceGraph".equals(fieldName)) { + deserializedCustomRolloutSpecificationAutoProvisionConfig.resourceGraph + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedCustomRolloutSpecificationAutoProvisionConfig; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationCanary.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationCanary.java index b7017530e02e..ccc48ed9befc 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationCanary.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationCanary.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The CustomRolloutSpecificationCanary model. + * The canary region configuration. */ @Fluent public final class CustomRolloutSpecificationCanary extends TrafficRegions { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationProviderRegistration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationProviderRegistration.java index 8fffcb9d8796..4f6ddb75f6b3 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationProviderRegistration.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutSpecificationProviderRegistration.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.providerhub.models; import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -12,10 +13,15 @@ import java.io.IOException; /** - * The CustomRolloutSpecificationProviderRegistration model. + * The provider registration. */ @Fluent public final class CustomRolloutSpecificationProviderRegistration extends ProviderRegistrationInner { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -37,6 +43,16 @@ public final class CustomRolloutSpecificationProviderRegistration extends Provid public CustomRolloutSpecificationProviderRegistration() { } + /** + * 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 type property: The type of the resource. * @@ -76,6 +92,15 @@ public CustomRolloutSpecificationProviderRegistration withProperties(ProviderReg return this; } + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutSpecificationProviderRegistration withKind(ProviderRegistrationKind kind) { + super.withKind(kind); + return this; + } + /** * Validates the instance. * @@ -95,6 +120,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", properties()); + jsonWriter.writeStringField("kind", kind() == null ? null : kind().toString()); return jsonWriter.writeEndObject(); } @@ -124,6 +150,11 @@ public static CustomRolloutSpecificationProviderRegistration fromJson(JsonReader } else if ("properties".equals(fieldName)) { deserializedCustomRolloutSpecificationProviderRegistration .withProperties(ProviderRegistrationProperties.fromJson(reader)); + } else if ("kind".equals(fieldName)) { + deserializedCustomRolloutSpecificationProviderRegistration + .withKind(ProviderRegistrationKind.fromString(reader.getString())); + } else if ("systemData".equals(fieldName)) { + deserializedCustomRolloutSpecificationProviderRegistration.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatus.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatus.java index 8c6996ea5923..994b5ef66d5d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatus.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatus.java @@ -19,15 +19,20 @@ @Fluent public class CustomRolloutStatus implements JsonSerializable { /* - * The completedRegions property. + * The completed regions. */ private List completedRegions; /* - * Dictionary of + * The failed or skipped regions. */ private Map failedOrSkippedRegions; + /* + * The manifest checkin status. + */ + private CustomRolloutStatusManifestCheckinStatus manifestCheckinStatus; + /** * Creates an instance of CustomRolloutStatus class. */ @@ -35,7 +40,7 @@ public CustomRolloutStatus() { } /** - * Get the completedRegions property: The completedRegions property. + * Get the completedRegions property: The completed regions. * * @return the completedRegions value. */ @@ -44,7 +49,7 @@ public List completedRegions() { } /** - * Set the completedRegions property: The completedRegions property. + * Set the completedRegions property: The completed regions. * * @param completedRegions the completedRegions value to set. * @return the CustomRolloutStatus object itself. @@ -55,7 +60,7 @@ public CustomRolloutStatus withCompletedRegions(List completedRegions) { } /** - * Get the failedOrSkippedRegions property: Dictionary of <ExtendedErrorInfo>. + * Get the failedOrSkippedRegions property: The failed or skipped regions. * * @return the failedOrSkippedRegions value. */ @@ -64,7 +69,7 @@ public Map failedOrSkippedRegions() { } /** - * Set the failedOrSkippedRegions property: Dictionary of <ExtendedErrorInfo>. + * Set the failedOrSkippedRegions property: The failed or skipped regions. * * @param failedOrSkippedRegions the failedOrSkippedRegions value to set. * @return the CustomRolloutStatus object itself. @@ -74,6 +79,27 @@ public CustomRolloutStatus withFailedOrSkippedRegions(Map writer.writeString(element)); jsonWriter.writeMapField("failedOrSkippedRegions", this.failedOrSkippedRegions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("manifestCheckinStatus", this.manifestCheckinStatus); return jsonWriter.writeEndObject(); } @@ -124,6 +154,9 @@ public static CustomRolloutStatus fromJson(JsonReader jsonReader) throws IOExcep Map failedOrSkippedRegions = reader.readMap(reader1 -> ExtendedErrorInfo.fromJson(reader1)); deserializedCustomRolloutStatus.failedOrSkippedRegions = failedOrSkippedRegions; + } else if ("manifestCheckinStatus".equals(fieldName)) { + deserializedCustomRolloutStatus.manifestCheckinStatus + = CustomRolloutStatusManifestCheckinStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatusManifestCheckinStatus.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatusManifestCheckinStatus.java new file mode 100644 index 000000000000..9a6295ed68cd --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRolloutStatusManifestCheckinStatus.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.providerhub.fluent.models.CheckinManifestInfoInner; +import java.io.IOException; + +/** + * The manifest checkin status. + */ +@Fluent +public final class CustomRolloutStatusManifestCheckinStatus extends CheckinManifestInfoInner { + /** + * Creates an instance of CustomRolloutStatusManifestCheckinStatus class. + */ + public CustomRolloutStatusManifestCheckinStatus() { + } + + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutStatusManifestCheckinStatus withIsCheckedIn(boolean isCheckedIn) { + super.withIsCheckedIn(isCheckedIn); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutStatusManifestCheckinStatus withStatusMessage(String statusMessage) { + super.withStatusMessage(statusMessage); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutStatusManifestCheckinStatus withPullRequest(String pullRequest) { + super.withPullRequest(pullRequest); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomRolloutStatusManifestCheckinStatus withCommitId(String commitId) { + super.withCommitId(commitId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (statusMessage() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property statusMessage in model CustomRolloutStatusManifestCheckinStatus")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomRolloutStatusManifestCheckinStatus.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isCheckedIn", isCheckedIn()); + jsonWriter.writeStringField("statusMessage", statusMessage()); + jsonWriter.writeStringField("pullRequest", pullRequest()); + jsonWriter.writeStringField("commitId", commitId()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomRolloutStatusManifestCheckinStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomRolloutStatusManifestCheckinStatus 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 CustomRolloutStatusManifestCheckinStatus. + */ + public static CustomRolloutStatusManifestCheckinStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomRolloutStatusManifestCheckinStatus deserializedCustomRolloutStatusManifestCheckinStatus + = new CustomRolloutStatusManifestCheckinStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isCheckedIn".equals(fieldName)) { + deserializedCustomRolloutStatusManifestCheckinStatus.withIsCheckedIn(reader.getBoolean()); + } else if ("statusMessage".equals(fieldName)) { + deserializedCustomRolloutStatusManifestCheckinStatus.withStatusMessage(reader.getString()); + } else if ("pullRequest".equals(fieldName)) { + deserializedCustomRolloutStatusManifestCheckinStatus.withPullRequest(reader.getString()); + } else if ("commitId".equals(fieldName)) { + deserializedCustomRolloutStatusManifestCheckinStatus.withCommitId(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCustomRolloutStatusManifestCheckinStatus; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollouts.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollouts.java index 05384a5c11de..c1078cb3e8ea 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollouts.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/CustomRollouts.java @@ -37,6 +37,30 @@ public interface CustomRollouts { */ CustomRollout get(String providerNamespace, String rolloutName); + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByResourceGroupWithResponse(String providerNamespace, String rolloutName, Context context); + + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String providerNamespace, String rolloutName); + /** * Gets the list of the custom rollouts for the given provider. * @@ -60,6 +84,30 @@ public interface CustomRollouts { */ PagedIterable listByProviderRegistration(String providerNamespace, Context context); + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response stopWithResponse(String providerNamespace, String rolloutName, Context context); + + /** + * Stops or cancels the custom rollout, if in progress. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param rolloutName The rollout name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(String providerNamespace, String rolloutName); + /** * Gets the custom rollout details. * @@ -83,6 +131,28 @@ public interface CustomRollouts { */ Response getByIdWithResponse(String id, Context context); + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the custom rollout resource. Custom rollout must be in terminal state. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + /** * Begins definition for a new CustomRollout resource. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DataBoundary.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DataBoundary.java new file mode 100644 index 000000000000..cd0e58e228e1 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DataBoundary.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The data boundary. + */ +public final class DataBoundary extends ExpandableStringEnum { + /** + * Static value NotDefined for DataBoundary. + */ + public static final DataBoundary NOT_DEFINED = fromString("NotDefined"); + + /** + * Static value Global for DataBoundary. + */ + public static final DataBoundary GLOBAL = fromString("Global"); + + /** + * Static value EU for DataBoundary. + */ + public static final DataBoundary EU = fromString("EU"); + + /** + * Static value US for DataBoundary. + */ + public static final DataBoundary US = fromString("US"); + + /** + * Creates a new instance of DataBoundary value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataBoundary() { + } + + /** + * Creates or finds a DataBoundary from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataBoundary. + */ + public static DataBoundary fromString(String name) { + return fromString(name, DataBoundary.class); + } + + /** + * Gets known DataBoundary values. + * + * @return known DataBoundary values. + */ + public static Collection values() { + return values(DataBoundary.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRollout.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRollout.java index d22fe9aee9ac..9d4105002acd 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRollout.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRollout.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.providerhub.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.DefaultRolloutInner; @@ -40,6 +41,13 @@ public interface DefaultRollout { */ DefaultRolloutProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.DefaultRolloutInner object. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutProperties.java index 7ad847f5e28b..48d1b4ea3bc6 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutProperties.java @@ -6,15 +6,31 @@ import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; /** - * Properties of the rollout. + * The DefaultRolloutProperties model. */ @Fluent -public final class DefaultRolloutProperties extends DefaultRolloutPropertiesAutoGenerated { +public final class DefaultRolloutProperties implements JsonSerializable { + /* + * The provisioned state of the resource. + */ + private ProvisioningState provisioningState; + + /* + * The default rollout specification. + */ + private DefaultRolloutPropertiesSpecification specification; + + /* + * The default rollout status. + */ + private DefaultRolloutPropertiesStatus status; + /** * Creates an instance of DefaultRolloutProperties class. */ @@ -22,29 +38,51 @@ public DefaultRolloutProperties() { } /** - * {@inheritDoc} + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. */ - @Override - public DefaultRolloutProperties withProvisioningState(ProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * {@inheritDoc} + * Get the specification property: The default rollout specification. + * + * @return the specification value. + */ + public DefaultRolloutPropertiesSpecification specification() { + return this.specification; + } + + /** + * Set the specification property: The default rollout specification. + * + * @param specification the specification value to set. + * @return the DefaultRolloutProperties object itself. */ - @Override public DefaultRolloutProperties withSpecification(DefaultRolloutPropertiesSpecification specification) { - super.withSpecification(specification); + this.specification = specification; return this; } /** - * {@inheritDoc} + * Get the status property: The default rollout status. + * + * @return the status value. + */ + public DefaultRolloutPropertiesStatus status() { + return this.status; + } + + /** + * Set the status property: The default rollout status. + * + * @param status the status value to set. + * @return the DefaultRolloutProperties object itself. */ - @Override public DefaultRolloutProperties withStatus(DefaultRolloutPropertiesStatus status) { - super.withStatus(status); + this.status = status; return this; } @@ -53,7 +91,6 @@ public DefaultRolloutProperties withStatus(DefaultRolloutPropertiesStatus status * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (specification() != null) { specification().validate(); @@ -69,10 +106,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); - jsonWriter.writeJsonField("specification", specification()); - jsonWriter.writeJsonField("status", status()); + jsonWriter.writeJsonField("specification", this.specification); + jsonWriter.writeJsonField("status", this.status); return jsonWriter.writeEndObject(); } @@ -92,13 +127,13 @@ public static DefaultRolloutProperties fromJson(JsonReader jsonReader) throws IO reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedDefaultRolloutProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); + deserializedDefaultRolloutProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else if ("specification".equals(fieldName)) { - deserializedDefaultRolloutProperties - .withSpecification(DefaultRolloutPropertiesSpecification.fromJson(reader)); + deserializedDefaultRolloutProperties.specification + = DefaultRolloutPropertiesSpecification.fromJson(reader); } else if ("status".equals(fieldName)) { - deserializedDefaultRolloutProperties.withStatus(DefaultRolloutPropertiesStatus.fromJson(reader)); + deserializedDefaultRolloutProperties.status = DefaultRolloutPropertiesStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesAutoGenerated.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesAutoGenerated.java deleted file mode 100644 index 9944b1582738..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesAutoGenerated.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The DefaultRolloutPropertiesAutoGenerated model. - */ -@Fluent -public class DefaultRolloutPropertiesAutoGenerated implements JsonSerializable { - /* - * The provisioningState property. - */ - private ProvisioningState provisioningState; - - /* - * The specification property. - */ - private DefaultRolloutPropertiesSpecification specification; - - /* - * The status property. - */ - private DefaultRolloutPropertiesStatus status; - - /** - * Creates an instance of DefaultRolloutPropertiesAutoGenerated class. - */ - public DefaultRolloutPropertiesAutoGenerated() { - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The provisioningState property. - * - * @param provisioningState the provisioningState value to set. - * @return the DefaultRolloutPropertiesAutoGenerated object itself. - */ - public DefaultRolloutPropertiesAutoGenerated withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the specification property: The specification property. - * - * @return the specification value. - */ - public DefaultRolloutPropertiesSpecification specification() { - return this.specification; - } - - /** - * Set the specification property: The specification property. - * - * @param specification the specification value to set. - * @return the DefaultRolloutPropertiesAutoGenerated object itself. - */ - public DefaultRolloutPropertiesAutoGenerated - withSpecification(DefaultRolloutPropertiesSpecification specification) { - this.specification = specification; - return this; - } - - /** - * Get the status property: The status property. - * - * @return the status value. - */ - public DefaultRolloutPropertiesStatus status() { - return this.status; - } - - /** - * Set the status property: The status property. - * - * @param status the status value to set. - * @return the DefaultRolloutPropertiesAutoGenerated object itself. - */ - public DefaultRolloutPropertiesAutoGenerated withStatus(DefaultRolloutPropertiesStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (specification() != null) { - specification().validate(); - } - if (status() != null) { - status().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - jsonWriter.writeJsonField("specification", this.specification); - jsonWriter.writeJsonField("status", this.status); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DefaultRolloutPropertiesAutoGenerated from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DefaultRolloutPropertiesAutoGenerated 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 DefaultRolloutPropertiesAutoGenerated. - */ - public static DefaultRolloutPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DefaultRolloutPropertiesAutoGenerated deserializedDefaultRolloutPropertiesAutoGenerated - = new DefaultRolloutPropertiesAutoGenerated(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedDefaultRolloutPropertiesAutoGenerated.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("specification".equals(fieldName)) { - deserializedDefaultRolloutPropertiesAutoGenerated.specification - = DefaultRolloutPropertiesSpecification.fromJson(reader); - } else if ("status".equals(fieldName)) { - deserializedDefaultRolloutPropertiesAutoGenerated.status - = DefaultRolloutPropertiesStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDefaultRolloutPropertiesAutoGenerated; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesSpecification.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesSpecification.java index 7a33c8f8bb74..b4c5e3ec0352 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesSpecification.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesSpecification.java @@ -13,7 +13,7 @@ import java.util.List; /** - * The DefaultRolloutPropertiesSpecification model. + * The default rollout specification. */ @Fluent public final class DefaultRolloutPropertiesSpecification extends DefaultRolloutSpecification { @@ -23,6 +23,16 @@ public final class DefaultRolloutPropertiesSpecification extends DefaultRolloutS public DefaultRolloutPropertiesSpecification() { } + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutPropertiesSpecification + withExpeditedRollout(DefaultRolloutSpecificationExpeditedRollout expeditedRollout) { + super.withExpeditedRollout(expeditedRollout); + return this; + } + /** * {@inheritDoc} */ @@ -100,6 +110,16 @@ public DefaultRolloutPropertiesSpecification withHighTraffic(DefaultRolloutSpeci return this; } + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutPropertiesSpecification + withAutoProvisionConfig(DefaultRolloutSpecificationAutoProvisionConfig autoProvisionConfig) { + super.withAutoProvisionConfig(autoProvisionConfig); + return this; + } + /** * Validates the instance. * @@ -107,6 +127,9 @@ public DefaultRolloutPropertiesSpecification withHighTraffic(DefaultRolloutSpeci */ @Override public void validate() { + if (expeditedRollout() != null) { + expeditedRollout().validate(); + } if (canary() != null) { canary().validate(); } @@ -131,6 +154,9 @@ public void validate() { if (resourceTypeRegistrations() != null) { resourceTypeRegistrations().forEach(e -> e.validate()); } + if (autoProvisionConfig() != null) { + autoProvisionConfig().validate(); + } } /** @@ -139,6 +165,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("expeditedRollout", expeditedRollout()); jsonWriter.writeJsonField("canary", canary()); jsonWriter.writeJsonField("lowTraffic", lowTraffic()); jsonWriter.writeJsonField("mediumTraffic", mediumTraffic()); @@ -148,6 +175,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("providerRegistration", providerRegistration()); jsonWriter.writeArrayField("resourceTypeRegistrations", resourceTypeRegistrations(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("autoProvisionConfig", autoProvisionConfig()); return jsonWriter.writeEndObject(); } @@ -167,7 +195,10 @@ public static DefaultRolloutPropertiesSpecification fromJson(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("canary".equals(fieldName)) { + if ("expeditedRollout".equals(fieldName)) { + deserializedDefaultRolloutPropertiesSpecification + .withExpeditedRollout(DefaultRolloutSpecificationExpeditedRollout.fromJson(reader)); + } else if ("canary".equals(fieldName)) { deserializedDefaultRolloutPropertiesSpecification .withCanary(DefaultRolloutSpecificationCanary.fromJson(reader)); } else if ("lowTraffic".equals(fieldName)) { @@ -193,6 +224,9 @@ public static DefaultRolloutPropertiesSpecification fromJson(JsonReader jsonRead = reader.readArray(reader1 -> ResourceTypeRegistrationInner.fromJson(reader1)); deserializedDefaultRolloutPropertiesSpecification .withResourceTypeRegistrations(resourceTypeRegistrations); + } else if ("autoProvisionConfig".equals(fieldName)) { + deserializedDefaultRolloutPropertiesSpecification + .withAutoProvisionConfig(DefaultRolloutSpecificationAutoProvisionConfig.fromJson(reader)); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesStatus.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesStatus.java index e6f2368f53c2..4cf0269d8fd9 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesStatus.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutPropertiesStatus.java @@ -16,7 +16,7 @@ import java.util.Map; /** - * The DefaultRolloutPropertiesStatus model. + * The default rollout status. */ @Fluent public final class DefaultRolloutPropertiesStatus extends DefaultRolloutStatus { @@ -55,6 +55,16 @@ public DefaultRolloutPropertiesStatus withNextTrafficRegion(TrafficRegionCategor return this; } + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutPropertiesStatus + withManifestCheckinStatus(DefaultRolloutStatusManifestCheckinStatus manifestCheckinStatus) { + super.withManifestCheckinStatus(manifestCheckinStatus); + return this; + } + /** * {@inheritDoc} */ @@ -88,6 +98,9 @@ public void validate() { } }); } + if (manifestCheckinStatus() != null) { + manifestCheckinStatus().validate(); + } } /** @@ -108,6 +121,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(nextTrafficRegionScheduledTime())); jsonWriter.writeStringField("subscriptionReregistrationResult", subscriptionReregistrationResult() == null ? null : subscriptionReregistrationResult().toString()); + jsonWriter.writeJsonField("manifestCheckinStatus", manifestCheckinStatus()); return jsonWriter.writeEndObject(); } @@ -143,6 +157,9 @@ public static DefaultRolloutPropertiesStatus fromJson(JsonReader jsonReader) thr } else if ("subscriptionReregistrationResult".equals(fieldName)) { deserializedDefaultRolloutPropertiesStatus.withSubscriptionReregistrationResult( SubscriptionReregistrationResult.fromString(reader.getString())); + } else if ("manifestCheckinStatus".equals(fieldName)) { + deserializedDefaultRolloutPropertiesStatus + .withManifestCheckinStatus(DefaultRolloutStatusManifestCheckinStatus.fromJson(reader)); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecification.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecification.java index e36d76d98169..6f0e63ca0d37 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecification.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecification.java @@ -19,45 +19,55 @@ @Fluent public class DefaultRolloutSpecification implements JsonSerializable { /* - * The canary property. + * The expedited rollout definition. + */ + private DefaultRolloutSpecificationExpeditedRollout expeditedRollout; + + /* + * The canary traffic region configuration. */ private DefaultRolloutSpecificationCanary canary; /* - * The lowTraffic property. + * The low traffic region configuration. */ private DefaultRolloutSpecificationLowTraffic lowTraffic; /* - * The mediumTraffic property. + * The medium traffic region configuration. */ private DefaultRolloutSpecificationMediumTraffic mediumTraffic; /* - * The highTraffic property. + * The high traffic region configuration. */ private DefaultRolloutSpecificationHighTraffic highTraffic; /* - * The restOfTheWorldGroupOne property. + * The rest of the world group one region configuration. */ private DefaultRolloutSpecificationRestOfTheWorldGroupOne restOfTheWorldGroupOne; /* - * The restOfTheWorldGroupTwo property. + * The rest of the world group two region configuration. */ private DefaultRolloutSpecificationRestOfTheWorldGroupTwo restOfTheWorldGroupTwo; /* - * The providerRegistration property. + * The provider registration. */ private DefaultRolloutSpecificationProviderRegistration providerRegistration; /* - * The resourceTypeRegistrations property. + * The resource type registrations. */ private List resourceTypeRegistrations; + /* + * The auto provisioning config. + */ + private DefaultRolloutSpecificationAutoProvisionConfig autoProvisionConfig; + /** * Creates an instance of DefaultRolloutSpecification class. */ @@ -65,7 +75,28 @@ public DefaultRolloutSpecification() { } /** - * Get the canary property: The canary property. + * Get the expeditedRollout property: The expedited rollout definition. + * + * @return the expeditedRollout value. + */ + public DefaultRolloutSpecificationExpeditedRollout expeditedRollout() { + return this.expeditedRollout; + } + + /** + * Set the expeditedRollout property: The expedited rollout definition. + * + * @param expeditedRollout the expeditedRollout value to set. + * @return the DefaultRolloutSpecification object itself. + */ + public DefaultRolloutSpecification + withExpeditedRollout(DefaultRolloutSpecificationExpeditedRollout expeditedRollout) { + this.expeditedRollout = expeditedRollout; + return this; + } + + /** + * Get the canary property: The canary traffic region configuration. * * @return the canary value. */ @@ -74,7 +105,7 @@ public DefaultRolloutSpecificationCanary canary() { } /** - * Set the canary property: The canary property. + * Set the canary property: The canary traffic region configuration. * * @param canary the canary value to set. * @return the DefaultRolloutSpecification object itself. @@ -85,7 +116,7 @@ public DefaultRolloutSpecification withCanary(DefaultRolloutSpecificationCanary } /** - * Get the lowTraffic property: The lowTraffic property. + * Get the lowTraffic property: The low traffic region configuration. * * @return the lowTraffic value. */ @@ -94,7 +125,7 @@ public DefaultRolloutSpecificationLowTraffic lowTraffic() { } /** - * Set the lowTraffic property: The lowTraffic property. + * Set the lowTraffic property: The low traffic region configuration. * * @param lowTraffic the lowTraffic value to set. * @return the DefaultRolloutSpecification object itself. @@ -105,7 +136,7 @@ public DefaultRolloutSpecification withLowTraffic(DefaultRolloutSpecificationLow } /** - * Get the mediumTraffic property: The mediumTraffic property. + * Get the mediumTraffic property: The medium traffic region configuration. * * @return the mediumTraffic value. */ @@ -114,7 +145,7 @@ public DefaultRolloutSpecificationMediumTraffic mediumTraffic() { } /** - * Set the mediumTraffic property: The mediumTraffic property. + * Set the mediumTraffic property: The medium traffic region configuration. * * @param mediumTraffic the mediumTraffic value to set. * @return the DefaultRolloutSpecification object itself. @@ -125,7 +156,7 @@ public DefaultRolloutSpecification withMediumTraffic(DefaultRolloutSpecification } /** - * Get the highTraffic property: The highTraffic property. + * Get the highTraffic property: The high traffic region configuration. * * @return the highTraffic value. */ @@ -134,7 +165,7 @@ public DefaultRolloutSpecificationHighTraffic highTraffic() { } /** - * Set the highTraffic property: The highTraffic property. + * Set the highTraffic property: The high traffic region configuration. * * @param highTraffic the highTraffic value to set. * @return the DefaultRolloutSpecification object itself. @@ -145,7 +176,7 @@ public DefaultRolloutSpecification withHighTraffic(DefaultRolloutSpecificationHi } /** - * Get the restOfTheWorldGroupOne property: The restOfTheWorldGroupOne property. + * Get the restOfTheWorldGroupOne property: The rest of the world group one region configuration. * * @return the restOfTheWorldGroupOne value. */ @@ -154,7 +185,7 @@ public DefaultRolloutSpecificationRestOfTheWorldGroupOne restOfTheWorldGroupOne( } /** - * Set the restOfTheWorldGroupOne property: The restOfTheWorldGroupOne property. + * Set the restOfTheWorldGroupOne property: The rest of the world group one region configuration. * * @param restOfTheWorldGroupOne the restOfTheWorldGroupOne value to set. * @return the DefaultRolloutSpecification object itself. @@ -166,7 +197,7 @@ public DefaultRolloutSpecificationRestOfTheWorldGroupOne restOfTheWorldGroupOne( } /** - * Get the restOfTheWorldGroupTwo property: The restOfTheWorldGroupTwo property. + * Get the restOfTheWorldGroupTwo property: The rest of the world group two region configuration. * * @return the restOfTheWorldGroupTwo value. */ @@ -175,7 +206,7 @@ public DefaultRolloutSpecificationRestOfTheWorldGroupTwo restOfTheWorldGroupTwo( } /** - * Set the restOfTheWorldGroupTwo property: The restOfTheWorldGroupTwo property. + * Set the restOfTheWorldGroupTwo property: The rest of the world group two region configuration. * * @param restOfTheWorldGroupTwo the restOfTheWorldGroupTwo value to set. * @return the DefaultRolloutSpecification object itself. @@ -187,7 +218,7 @@ public DefaultRolloutSpecificationRestOfTheWorldGroupTwo restOfTheWorldGroupTwo( } /** - * Get the providerRegistration property: The providerRegistration property. + * Get the providerRegistration property: The provider registration. * * @return the providerRegistration value. */ @@ -196,7 +227,7 @@ public DefaultRolloutSpecificationProviderRegistration providerRegistration() { } /** - * Set the providerRegistration property: The providerRegistration property. + * Set the providerRegistration property: The provider registration. * * @param providerRegistration the providerRegistration value to set. * @return the DefaultRolloutSpecification object itself. @@ -208,7 +239,7 @@ public DefaultRolloutSpecificationProviderRegistration providerRegistration() { } /** - * Get the resourceTypeRegistrations property: The resourceTypeRegistrations property. + * Get the resourceTypeRegistrations property: The resource type registrations. * * @return the resourceTypeRegistrations value. */ @@ -217,7 +248,7 @@ public List resourceTypeRegistrations() { } /** - * Set the resourceTypeRegistrations property: The resourceTypeRegistrations property. + * Set the resourceTypeRegistrations property: The resource type registrations. * * @param resourceTypeRegistrations the resourceTypeRegistrations value to set. * @return the DefaultRolloutSpecification object itself. @@ -228,12 +259,36 @@ public List resourceTypeRegistrations() { return this; } + /** + * Get the autoProvisionConfig property: The auto provisioning config. + * + * @return the autoProvisionConfig value. + */ + public DefaultRolloutSpecificationAutoProvisionConfig autoProvisionConfig() { + return this.autoProvisionConfig; + } + + /** + * Set the autoProvisionConfig property: The auto provisioning config. + * + * @param autoProvisionConfig the autoProvisionConfig value to set. + * @return the DefaultRolloutSpecification object itself. + */ + public DefaultRolloutSpecification + withAutoProvisionConfig(DefaultRolloutSpecificationAutoProvisionConfig autoProvisionConfig) { + this.autoProvisionConfig = autoProvisionConfig; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (expeditedRollout() != null) { + expeditedRollout().validate(); + } if (canary() != null) { canary().validate(); } @@ -258,6 +313,9 @@ public void validate() { if (resourceTypeRegistrations() != null) { resourceTypeRegistrations().forEach(e -> e.validate()); } + if (autoProvisionConfig() != null) { + autoProvisionConfig().validate(); + } } /** @@ -266,6 +324,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("expeditedRollout", this.expeditedRollout); jsonWriter.writeJsonField("canary", this.canary); jsonWriter.writeJsonField("lowTraffic", this.lowTraffic); jsonWriter.writeJsonField("mediumTraffic", this.mediumTraffic); @@ -275,6 +334,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("providerRegistration", this.providerRegistration); jsonWriter.writeArrayField("resourceTypeRegistrations", this.resourceTypeRegistrations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("autoProvisionConfig", this.autoProvisionConfig); return jsonWriter.writeEndObject(); } @@ -293,7 +353,10 @@ public static DefaultRolloutSpecification fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("canary".equals(fieldName)) { + if ("expeditedRollout".equals(fieldName)) { + deserializedDefaultRolloutSpecification.expeditedRollout + = DefaultRolloutSpecificationExpeditedRollout.fromJson(reader); + } else if ("canary".equals(fieldName)) { deserializedDefaultRolloutSpecification.canary = DefaultRolloutSpecificationCanary.fromJson(reader); } else if ("lowTraffic".equals(fieldName)) { deserializedDefaultRolloutSpecification.lowTraffic @@ -317,6 +380,9 @@ public static DefaultRolloutSpecification fromJson(JsonReader jsonReader) throws List resourceTypeRegistrations = reader.readArray(reader1 -> ResourceTypeRegistrationInner.fromJson(reader1)); deserializedDefaultRolloutSpecification.resourceTypeRegistrations = resourceTypeRegistrations; + } else if ("autoProvisionConfig".equals(fieldName)) { + deserializedDefaultRolloutSpecification.autoProvisionConfig + = DefaultRolloutSpecificationAutoProvisionConfig.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationAutoProvisionConfig.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationAutoProvisionConfig.java new file mode 100644 index 000000000000..4cd562a1927e --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationAutoProvisionConfig.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The auto provisioning config. + */ +@Fluent +public final class DefaultRolloutSpecificationAutoProvisionConfig + implements JsonSerializable { + /* + * Whether auto provisioning for storage is enabled. + */ + private Boolean storage; + + /* + * Whether auto provisioning for resource graph is enabled. + */ + private Boolean resourceGraph; + + /** + * Creates an instance of DefaultRolloutSpecificationAutoProvisionConfig class. + */ + public DefaultRolloutSpecificationAutoProvisionConfig() { + } + + /** + * Get the storage property: Whether auto provisioning for storage is enabled. + * + * @return the storage value. + */ + public Boolean storage() { + return this.storage; + } + + /** + * Set the storage property: Whether auto provisioning for storage is enabled. + * + * @param storage the storage value to set. + * @return the DefaultRolloutSpecificationAutoProvisionConfig object itself. + */ + public DefaultRolloutSpecificationAutoProvisionConfig withStorage(Boolean storage) { + this.storage = storage; + return this; + } + + /** + * Get the resourceGraph property: Whether auto provisioning for resource graph is enabled. + * + * @return the resourceGraph value. + */ + public Boolean resourceGraph() { + return this.resourceGraph; + } + + /** + * Set the resourceGraph property: Whether auto provisioning for resource graph is enabled. + * + * @param resourceGraph the resourceGraph value to set. + * @return the DefaultRolloutSpecificationAutoProvisionConfig object itself. + */ + public DefaultRolloutSpecificationAutoProvisionConfig withResourceGraph(Boolean resourceGraph) { + this.resourceGraph = resourceGraph; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("storage", this.storage); + jsonWriter.writeBooleanField("resourceGraph", this.resourceGraph); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DefaultRolloutSpecificationAutoProvisionConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DefaultRolloutSpecificationAutoProvisionConfig 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 DefaultRolloutSpecificationAutoProvisionConfig. + */ + public static DefaultRolloutSpecificationAutoProvisionConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DefaultRolloutSpecificationAutoProvisionConfig deserializedDefaultRolloutSpecificationAutoProvisionConfig + = new DefaultRolloutSpecificationAutoProvisionConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storage".equals(fieldName)) { + deserializedDefaultRolloutSpecificationAutoProvisionConfig.storage + = reader.getNullable(JsonReader::getBoolean); + } else if ("resourceGraph".equals(fieldName)) { + deserializedDefaultRolloutSpecificationAutoProvisionConfig.resourceGraph + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDefaultRolloutSpecificationAutoProvisionConfig; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationCanary.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationCanary.java index ac62a2a6e0ae..8db61c3c0ef5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationCanary.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationCanary.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The DefaultRolloutSpecificationCanary model. + * The canary traffic region configuration. */ @Fluent public final class DefaultRolloutSpecificationCanary extends CanaryTrafficRegionRolloutConfiguration { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationExpeditedRollout.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationExpeditedRollout.java new file mode 100644 index 000000000000..538ae52003aa --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationExpeditedRollout.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The expedited rollout definition. + */ +@Fluent +public final class DefaultRolloutSpecificationExpeditedRollout extends ExpeditedRolloutDefinition { + /** + * Creates an instance of DefaultRolloutSpecificationExpeditedRollout class. + */ + public DefaultRolloutSpecificationExpeditedRollout() { + } + + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutSpecificationExpeditedRollout withEnabled(Boolean enabled) { + super.withEnabled(enabled); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", enabled()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DefaultRolloutSpecificationExpeditedRollout from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DefaultRolloutSpecificationExpeditedRollout 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 DefaultRolloutSpecificationExpeditedRollout. + */ + public static DefaultRolloutSpecificationExpeditedRollout fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DefaultRolloutSpecificationExpeditedRollout deserializedDefaultRolloutSpecificationExpeditedRollout + = new DefaultRolloutSpecificationExpeditedRollout(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedDefaultRolloutSpecificationExpeditedRollout + .withEnabled(reader.getNullable(JsonReader::getBoolean)); + } else { + reader.skipChildren(); + } + } + + return deserializedDefaultRolloutSpecificationExpeditedRollout; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationHighTraffic.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationHighTraffic.java index 3ec935db82f0..31a4a4e83aec 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationHighTraffic.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationHighTraffic.java @@ -14,7 +14,7 @@ import java.util.List; /** - * The DefaultRolloutSpecificationHighTraffic model. + * The high traffic region configuration. */ @Fluent public final class DefaultRolloutSpecificationHighTraffic extends TrafficRegionRolloutConfiguration { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationLowTraffic.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationLowTraffic.java index b8c1ab4f1826..133dc973d3fb 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationLowTraffic.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationLowTraffic.java @@ -14,7 +14,7 @@ import java.util.List; /** - * The DefaultRolloutSpecificationLowTraffic model. + * The low traffic region configuration. */ @Fluent public final class DefaultRolloutSpecificationLowTraffic extends TrafficRegionRolloutConfiguration { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationMediumTraffic.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationMediumTraffic.java index a2bc08658a81..6eccd2b76748 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationMediumTraffic.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationMediumTraffic.java @@ -14,7 +14,7 @@ import java.util.List; /** - * The DefaultRolloutSpecificationMediumTraffic model. + * The medium traffic region configuration. */ @Fluent public final class DefaultRolloutSpecificationMediumTraffic extends TrafficRegionRolloutConfiguration { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationProviderRegistration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationProviderRegistration.java index e4f3a67d7d8d..1bc94256f2ac 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationProviderRegistration.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationProviderRegistration.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.providerhub.models; import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -12,10 +13,15 @@ import java.io.IOException; /** - * The DefaultRolloutSpecificationProviderRegistration model. + * The provider registration. */ @Fluent public final class DefaultRolloutSpecificationProviderRegistration extends ProviderRegistrationInner { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -37,6 +43,16 @@ public final class DefaultRolloutSpecificationProviderRegistration extends Provi public DefaultRolloutSpecificationProviderRegistration() { } + /** + * 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 type property: The type of the resource. * @@ -76,6 +92,15 @@ public DefaultRolloutSpecificationProviderRegistration withProperties(ProviderRe return this; } + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutSpecificationProviderRegistration withKind(ProviderRegistrationKind kind) { + super.withKind(kind); + return this; + } + /** * Validates the instance. * @@ -95,6 +120,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", properties()); + jsonWriter.writeStringField("kind", kind() == null ? null : kind().toString()); return jsonWriter.writeEndObject(); } @@ -124,6 +150,12 @@ public static DefaultRolloutSpecificationProviderRegistration fromJson(JsonReade } else if ("properties".equals(fieldName)) { deserializedDefaultRolloutSpecificationProviderRegistration .withProperties(ProviderRegistrationProperties.fromJson(reader)); + } else if ("kind".equals(fieldName)) { + deserializedDefaultRolloutSpecificationProviderRegistration + .withKind(ProviderRegistrationKind.fromString(reader.getString())); + } else if ("systemData".equals(fieldName)) { + deserializedDefaultRolloutSpecificationProviderRegistration.systemData + = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupOne.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupOne.java index f718f2e5ba6d..cd62e01fdba5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupOne.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupOne.java @@ -14,7 +14,7 @@ import java.util.List; /** - * The DefaultRolloutSpecificationRestOfTheWorldGroupOne model. + * The rest of the world group one region configuration. */ @Fluent public final class DefaultRolloutSpecificationRestOfTheWorldGroupOne extends TrafficRegionRolloutConfiguration { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupTwo.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupTwo.java index cb77cc33af29..c5fd94681ea3 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupTwo.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutSpecificationRestOfTheWorldGroupTwo.java @@ -14,7 +14,7 @@ import java.util.List; /** - * The DefaultRolloutSpecificationRestOfTheWorldGroupTwo model. + * The rest of the world group two region configuration. */ @Fluent public final class DefaultRolloutSpecificationRestOfTheWorldGroupTwo extends TrafficRegionRolloutConfiguration { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatus.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatus.java index e09c501bf648..768cf75a4340 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatus.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatus.java @@ -21,20 +21,25 @@ @Fluent public class DefaultRolloutStatus extends RolloutStatusBase { /* - * The nextTrafficRegion property. + * The next traffic region. */ private TrafficRegionCategory nextTrafficRegion; /* - * The nextTrafficRegionScheduledTime property. + * The next traffic region scheduled time. */ private OffsetDateTime nextTrafficRegionScheduledTime; /* - * The subscriptionReregistrationResult property. + * The subscription reregistration result. */ private SubscriptionReregistrationResult subscriptionReregistrationResult; + /* + * The manifest checkin status. + */ + private DefaultRolloutStatusManifestCheckinStatus manifestCheckinStatus; + /** * Creates an instance of DefaultRolloutStatus class. */ @@ -42,7 +47,7 @@ public DefaultRolloutStatus() { } /** - * Get the nextTrafficRegion property: The nextTrafficRegion property. + * Get the nextTrafficRegion property: The next traffic region. * * @return the nextTrafficRegion value. */ @@ -51,7 +56,7 @@ public TrafficRegionCategory nextTrafficRegion() { } /** - * Set the nextTrafficRegion property: The nextTrafficRegion property. + * Set the nextTrafficRegion property: The next traffic region. * * @param nextTrafficRegion the nextTrafficRegion value to set. * @return the DefaultRolloutStatus object itself. @@ -62,7 +67,7 @@ public DefaultRolloutStatus withNextTrafficRegion(TrafficRegionCategory nextTraf } /** - * Get the nextTrafficRegionScheduledTime property: The nextTrafficRegionScheduledTime property. + * Get the nextTrafficRegionScheduledTime property: The next traffic region scheduled time. * * @return the nextTrafficRegionScheduledTime value. */ @@ -71,7 +76,7 @@ public OffsetDateTime nextTrafficRegionScheduledTime() { } /** - * Set the nextTrafficRegionScheduledTime property: The nextTrafficRegionScheduledTime property. + * Set the nextTrafficRegionScheduledTime property: The next traffic region scheduled time. * * @param nextTrafficRegionScheduledTime the nextTrafficRegionScheduledTime value to set. * @return the DefaultRolloutStatus object itself. @@ -82,7 +87,7 @@ public DefaultRolloutStatus withNextTrafficRegionScheduledTime(OffsetDateTime ne } /** - * Get the subscriptionReregistrationResult property: The subscriptionReregistrationResult property. + * Get the subscriptionReregistrationResult property: The subscription reregistration result. * * @return the subscriptionReregistrationResult value. */ @@ -91,7 +96,7 @@ public SubscriptionReregistrationResult subscriptionReregistrationResult() { } /** - * Set the subscriptionReregistrationResult property: The subscriptionReregistrationResult property. + * Set the subscriptionReregistrationResult property: The subscription reregistration result. * * @param subscriptionReregistrationResult the subscriptionReregistrationResult value to set. * @return the DefaultRolloutStatus object itself. @@ -102,6 +107,27 @@ public SubscriptionReregistrationResult subscriptionReregistrationResult() { return this; } + /** + * Get the manifestCheckinStatus property: The manifest checkin status. + * + * @return the manifestCheckinStatus value. + */ + public DefaultRolloutStatusManifestCheckinStatus manifestCheckinStatus() { + return this.manifestCheckinStatus; + } + + /** + * Set the manifestCheckinStatus property: The manifest checkin status. + * + * @param manifestCheckinStatus the manifestCheckinStatus value to set. + * @return the DefaultRolloutStatus object itself. + */ + public DefaultRolloutStatus + withManifestCheckinStatus(DefaultRolloutStatusManifestCheckinStatus manifestCheckinStatus) { + this.manifestCheckinStatus = manifestCheckinStatus; + return this; + } + /** * {@inheritDoc} */ @@ -127,6 +153,9 @@ public DefaultRolloutStatus withFailedOrSkippedRegions(Map { if (e != null) { @@ -154,6 +183,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.nextTrafficRegionScheduledTime)); jsonWriter.writeStringField("subscriptionReregistrationResult", this.subscriptionReregistrationResult == null ? null : this.subscriptionReregistrationResult.toString()); + jsonWriter.writeJsonField("manifestCheckinStatus", this.manifestCheckinStatus); return jsonWriter.writeEndObject(); } @@ -188,6 +218,9 @@ public static DefaultRolloutStatus fromJson(JsonReader jsonReader) throws IOExce } else if ("subscriptionReregistrationResult".equals(fieldName)) { deserializedDefaultRolloutStatus.subscriptionReregistrationResult = SubscriptionReregistrationResult.fromString(reader.getString()); + } else if ("manifestCheckinStatus".equals(fieldName)) { + deserializedDefaultRolloutStatus.manifestCheckinStatus + = DefaultRolloutStatusManifestCheckinStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatusManifestCheckinStatus.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatusManifestCheckinStatus.java new file mode 100644 index 000000000000..7d065a954393 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DefaultRolloutStatusManifestCheckinStatus.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.providerhub.fluent.models.CheckinManifestInfoInner; +import java.io.IOException; + +/** + * The manifest checkin status. + */ +@Fluent +public final class DefaultRolloutStatusManifestCheckinStatus extends CheckinManifestInfoInner { + /** + * Creates an instance of DefaultRolloutStatusManifestCheckinStatus class. + */ + public DefaultRolloutStatusManifestCheckinStatus() { + } + + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutStatusManifestCheckinStatus withIsCheckedIn(boolean isCheckedIn) { + super.withIsCheckedIn(isCheckedIn); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutStatusManifestCheckinStatus withStatusMessage(String statusMessage) { + super.withStatusMessage(statusMessage); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutStatusManifestCheckinStatus withPullRequest(String pullRequest) { + super.withPullRequest(pullRequest); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DefaultRolloutStatusManifestCheckinStatus withCommitId(String commitId) { + super.withCommitId(commitId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (statusMessage() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property statusMessage in model DefaultRolloutStatusManifestCheckinStatus")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DefaultRolloutStatusManifestCheckinStatus.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isCheckedIn", isCheckedIn()); + jsonWriter.writeStringField("statusMessage", statusMessage()); + jsonWriter.writeStringField("pullRequest", pullRequest()); + jsonWriter.writeStringField("commitId", commitId()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DefaultRolloutStatusManifestCheckinStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DefaultRolloutStatusManifestCheckinStatus 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 DefaultRolloutStatusManifestCheckinStatus. + */ + public static DefaultRolloutStatusManifestCheckinStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DefaultRolloutStatusManifestCheckinStatus deserializedDefaultRolloutStatusManifestCheckinStatus + = new DefaultRolloutStatusManifestCheckinStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isCheckedIn".equals(fieldName)) { + deserializedDefaultRolloutStatusManifestCheckinStatus.withIsCheckedIn(reader.getBoolean()); + } else if ("statusMessage".equals(fieldName)) { + deserializedDefaultRolloutStatusManifestCheckinStatus.withStatusMessage(reader.getString()); + } else if ("pullRequest".equals(fieldName)) { + deserializedDefaultRolloutStatusManifestCheckinStatus.withPullRequest(reader.getString()); + } else if ("commitId".equals(fieldName)) { + deserializedDefaultRolloutStatusManifestCheckinStatus.withCommitId(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDefaultRolloutStatusManifestCheckinStatus; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DeleteDependency.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DeleteDependency.java new file mode 100644 index 000000000000..8fb47872c4ef --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DeleteDependency.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The DeleteDependency model. + */ +@Fluent +public final class DeleteDependency implements JsonSerializable { + /* + * Required features. + */ + private List requiredFeatures; + + /* + * Linked property. + */ + private String linkedProperty; + + /* + * Linked type. + */ + private String linkedType; + + /** + * Creates an instance of DeleteDependency class. + */ + public DeleteDependency() { + } + + /** + * Get the requiredFeatures property: Required features. + * + * @return the requiredFeatures value. + */ + public List requiredFeatures() { + return this.requiredFeatures; + } + + /** + * Set the requiredFeatures property: Required features. + * + * @param requiredFeatures the requiredFeatures value to set. + * @return the DeleteDependency object itself. + */ + public DeleteDependency withRequiredFeatures(List requiredFeatures) { + this.requiredFeatures = requiredFeatures; + return this; + } + + /** + * Get the linkedProperty property: Linked property. + * + * @return the linkedProperty value. + */ + public String linkedProperty() { + return this.linkedProperty; + } + + /** + * Set the linkedProperty property: Linked property. + * + * @param linkedProperty the linkedProperty value to set. + * @return the DeleteDependency object itself. + */ + public DeleteDependency withLinkedProperty(String linkedProperty) { + this.linkedProperty = linkedProperty; + return this; + } + + /** + * Get the linkedType property: Linked type. + * + * @return the linkedType value. + */ + public String linkedType() { + return this.linkedType; + } + + /** + * Set the linkedType property: Linked type. + * + * @param linkedType the linkedType value to set. + * @return the DeleteDependency object itself. + */ + public DeleteDependency withLinkedType(String linkedType) { + this.linkedType = linkedType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("linkedProperty", this.linkedProperty); + jsonWriter.writeStringField("linkedType", this.linkedType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeleteDependency from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeleteDependency 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 DeleteDependency. + */ + public static DeleteDependency fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeleteDependency deserializedDeleteDependency = new DeleteDependency(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requiredFeatures".equals(fieldName)) { + List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedDeleteDependency.requiredFeatures = requiredFeatures; + } else if ("linkedProperty".equals(fieldName)) { + deserializedDeleteDependency.linkedProperty = reader.getString(); + } else if ("linkedType".equals(fieldName)) { + deserializedDeleteDependency.linkedType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeleteDependency; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DstsConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DstsConfiguration.java new file mode 100644 index 000000000000..0edfd743e066 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/DstsConfiguration.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The DstsConfiguration model. + */ +@Fluent +public class DstsConfiguration implements JsonSerializable { + /* + * The service name. + */ + private String serviceName; + + /* + * This is a URI property. + */ + private String serviceDnsName; + + /** + * Creates an instance of DstsConfiguration class. + */ + public DstsConfiguration() { + } + + /** + * Get the serviceName property: The service name. + * + * @return the serviceName value. + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the serviceName property: The service name. + * + * @param serviceName the serviceName value to set. + * @return the DstsConfiguration object itself. + */ + public DstsConfiguration withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the serviceDnsName property: This is a URI property. + * + * @return the serviceDnsName value. + */ + public String serviceDnsName() { + return this.serviceDnsName; + } + + /** + * Set the serviceDnsName property: This is a URI property. + * + * @param serviceDnsName the serviceDnsName value to set. + * @return the DstsConfiguration object itself. + */ + public DstsConfiguration withServiceDnsName(String serviceDnsName) { + this.serviceDnsName = serviceDnsName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property serviceName in model DstsConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DstsConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", this.serviceName); + jsonWriter.writeStringField("serviceDnsName", this.serviceDnsName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DstsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DstsConfiguration 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 DstsConfiguration. + */ + public static DstsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DstsConfiguration deserializedDstsConfiguration = new DstsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedDstsConfiguration.serviceName = reader.getString(); + } else if ("serviceDnsName".equals(fieldName)) { + deserializedDstsConfiguration.serviceDnsName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDstsConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointInformation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointInformation.java new file mode 100644 index 000000000000..5ec910e25433 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointInformation.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EndpointInformation model. + */ +@Fluent +public final class EndpointInformation implements JsonSerializable { + /* + * The endpoint. + */ + private String endpoint; + + /* + * The endpoint type. + */ + private NotificationEndpointType endpointType; + + /* + * The schema version. + */ + private String schemaVersion; + + /** + * Creates an instance of EndpointInformation class. + */ + public EndpointInformation() { + } + + /** + * Get the endpoint property: The endpoint. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: The endpoint. + * + * @param endpoint the endpoint value to set. + * @return the EndpointInformation object itself. + */ + public EndpointInformation withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the endpointType property: The endpoint type. + * + * @return the endpointType value. + */ + public NotificationEndpointType endpointType() { + return this.endpointType; + } + + /** + * Set the endpointType property: The endpoint type. + * + * @param endpointType the endpointType value to set. + * @return the EndpointInformation object itself. + */ + public EndpointInformation withEndpointType(NotificationEndpointType endpointType) { + this.endpointType = endpointType; + return this; + } + + /** + * Get the schemaVersion property: The schema version. + * + * @return the schemaVersion value. + */ + public String schemaVersion() { + return this.schemaVersion; + } + + /** + * Set the schemaVersion property: The schema version. + * + * @param schemaVersion the schemaVersion value to set. + * @return the EndpointInformation object itself. + */ + public EndpointInformation withSchemaVersion(String schemaVersion) { + this.schemaVersion = schemaVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpoint", this.endpoint); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("schemaVersion", this.schemaVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointInformation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointInformation 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 EndpointInformation. + */ + public static EndpointInformation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointInformation deserializedEndpointInformation = new EndpointInformation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpoint".equals(fieldName)) { + deserializedEndpointInformation.endpoint = reader.getString(); + } else if ("endpointType".equals(fieldName)) { + deserializedEndpointInformation.endpointType + = NotificationEndpointType.fromString(reader.getString()); + } else if ("schemaVersion".equals(fieldName)) { + deserializedEndpointInformation.schemaVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointInformation; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointType.java new file mode 100644 index 000000000000..0ad8a37b6f77 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The endpoint type. + */ +public final class EndpointType extends ExpandableStringEnum { + /** + * Static value NotSpecified for EndpointType. + */ + public static final EndpointType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Canary for EndpointType. + */ + public static final EndpointType CANARY = fromString("Canary"); + + /** + * Static value Production for EndpointType. + */ + public static final EndpointType PRODUCTION = fromString("Production"); + + /** + * Static value TestInProduction for EndpointType. + */ + public static final EndpointType TEST_IN_PRODUCTION = fromString("TestInProduction"); + + /** + * Creates a new instance of EndpointType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointType() { + } + + /** + * Creates or finds a EndpointType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointType. + */ + public static EndpointType fromString(String name) { + return fromString(name, EndpointType.class); + } + + /** + * Gets known EndpointType values. + * + * @return known EndpointType values. + */ + public static Collection values() { + return values(EndpointType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointTypeResourceType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointTypeResourceType.java new file mode 100644 index 000000000000..ec12a48733ad --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/EndpointTypeResourceType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The endpoint type. + */ +public final class EndpointTypeResourceType extends ExpandableStringEnum { + /** + * Static value NotSpecified for EndpointTypeResourceType. + */ + public static final EndpointTypeResourceType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Canary for EndpointTypeResourceType. + */ + public static final EndpointTypeResourceType CANARY = fromString("Canary"); + + /** + * Static value Production for EndpointTypeResourceType. + */ + public static final EndpointTypeResourceType PRODUCTION = fromString("Production"); + + /** + * Static value TestInProduction for EndpointTypeResourceType. + */ + public static final EndpointTypeResourceType TEST_IN_PRODUCTION = fromString("TestInProduction"); + + /** + * Creates a new instance of EndpointTypeResourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointTypeResourceType() { + } + + /** + * Creates or finds a EndpointTypeResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointTypeResourceType. + */ + public static EndpointTypeResourceType fromString(String name) { + return fromString(name, EndpointTypeResourceType.class); + } + + /** + * Gets known EndpointTypeResourceType values. + * + * @return known EndpointTypeResourceType values. + */ + public static Collection values() { + return values(EndpointTypeResourceType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Error.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Error.java deleted file mode 100644 index 5867d0e0cf58..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Error.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.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 java.io.IOException; -import java.util.List; - -/** - * Standard error object. - */ -@Immutable -public class Error implements JsonSerializable { - /* - * Server-defined set of error codes. - */ - private String code; - - /* - * Human-readable representation of the error. - */ - private String message; - - /* - * Target of the error. - */ - private String target; - - /* - * Array of details about specific errors that led to this reported error. - */ - private List details; - - /* - * Object containing more specific information than the current object about the error. - */ - private ErrorInnerError innerError; - - /** - * Creates an instance of Error class. - */ - public Error() { - } - - /** - * Get the code property: Server-defined set of error codes. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: Server-defined set of error codes. - * - * @param code the code value to set. - * @return the Error object itself. - */ - Error withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: Human-readable representation of the error. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Human-readable representation of the error. - * - * @param message the message value to set. - * @return the Error object itself. - */ - Error withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the target property: Target of the error. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Target of the error. - * - * @param target the target value to set. - * @return the Error object itself. - */ - Error withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the details property: Array of details about specific errors that led to this reported error. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Set the details property: Array of details about specific errors that led to this reported error. - * - * @param details the details value to set. - * @return the Error object itself. - */ - Error withDetails(List details) { - this.details = details; - return this; - } - - /** - * Get the innerError property: Object containing more specific information than the current object about the error. - * - * @return the innerError value. - */ - public ErrorInnerError innerError() { - return this.innerError; - } - - /** - * Set the innerError property: Object containing more specific information than the current object about the error. - * - * @param innerError the innerError value to set. - * @return the Error object itself. - */ - Error withInnerError(ErrorInnerError innerError) { - this.innerError = innerError; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (details() != null) { - details().forEach(e -> e.validate()); - } - if (innerError() != null) { - innerError().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Error from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Error 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 Error. - */ - public static Error fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Error deserializedError = new Error(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedError.message = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedError.target = reader.getString(); - } else if ("details".equals(fieldName)) { - List details = reader.readArray(reader1 -> Error.fromJson(reader1)); - deserializedError.details = details; - } else if ("innerError".equals(fieldName)) { - deserializedError.innerError = ErrorInnerError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedError; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ErrorInnerError.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ErrorInnerError.java deleted file mode 100644 index 54e95d71e35e..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ErrorInnerError.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * Object containing more specific information than the current object about the error. - */ -@Immutable -public final class ErrorInnerError extends InnerError { - /* - * Object containing more specific information than the current object about the error. - */ - private Object innerError; - - /* - * Specific error code than was provided by the containing error. - */ - private String code; - - /** - * Creates an instance of ErrorInnerError class. - */ - public ErrorInnerError() { - } - - /** - * Get the innerError property: Object containing more specific information than the current object about the error. - * - * @return the innerError value. - */ - @Override - public Object innerError() { - return this.innerError; - } - - /** - * Get the code property: Specific error code than was provided by the containing error. - * - * @return the code value. - */ - @Override - public String code() { - return this.code; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - if (additionalProperties() != null) { - for (Map.Entry additionalProperty : additionalProperties().entrySet()) { - jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); - } - } - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ErrorInnerError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ErrorInnerError 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 ErrorInnerError. - */ - public static ErrorInnerError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ErrorInnerError deserializedErrorInnerError = new ErrorInnerError(); - Map additionalProperties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedErrorInnerError.code = reader.getString(); - } else if ("innerError".equals(fieldName)) { - deserializedErrorInnerError.innerError = reader.readUntyped(); - } else { - if (additionalProperties == null) { - additionalProperties = new LinkedHashMap<>(); - } - - additionalProperties.put(fieldName, reader.readUntyped()); - } - } - deserializedErrorInnerError.withAdditionalProperties(additionalProperties); - - return deserializedErrorInnerError; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutDefinition.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutDefinition.java new file mode 100644 index 000000000000..8ccf358210ac --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutDefinition.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ExpeditedRolloutDefinition model. + */ +@Fluent +public class ExpeditedRolloutDefinition implements JsonSerializable { + /* + * Indicates whether expedited rollout is enabled/disabled + */ + private Boolean enabled; + + /** + * Creates an instance of ExpeditedRolloutDefinition class. + */ + public ExpeditedRolloutDefinition() { + } + + /** + * Get the enabled property: Indicates whether expedited rollout is enabled/disabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether expedited rollout is enabled/disabled. + * + * @param enabled the enabled value to set. + * @return the ExpeditedRolloutDefinition object itself. + */ + public ExpeditedRolloutDefinition withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExpeditedRolloutDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExpeditedRolloutDefinition 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 ExpeditedRolloutDefinition. + */ + public static ExpeditedRolloutDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExpeditedRolloutDefinition deserializedExpeditedRolloutDefinition = new ExpeditedRolloutDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedExpeditedRolloutDefinition.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedExpeditedRolloutDefinition; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutIntent.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutIntent.java new file mode 100644 index 000000000000..2b85328a43c7 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExpeditedRolloutIntent.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Expedited rollout intent. + */ +public final class ExpeditedRolloutIntent extends ExpandableStringEnum { + /** + * Static value NotSpecified for ExpeditedRolloutIntent. + */ + public static final ExpeditedRolloutIntent NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Hotfix for ExpeditedRolloutIntent. + */ + public static final ExpeditedRolloutIntent HOTFIX = fromString("Hotfix"); + + /** + * Creates a new instance of ExpeditedRolloutIntent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExpeditedRolloutIntent() { + } + + /** + * Creates or finds a ExpeditedRolloutIntent from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExpeditedRolloutIntent. + */ + public static ExpeditedRolloutIntent fromString(String name) { + return fromString(name, ExpeditedRolloutIntent.class); + } + + /** + * Gets known ExpeditedRolloutIntent values. + * + * @return known ExpeditedRolloutIntent values. + */ + public static Collection values() { + return values(ExpeditedRolloutIntent.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedErrorInfo.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedErrorInfo.java index 7b0ccc49d558..f32ca7a4f32d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedErrorInfo.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedErrorInfo.java @@ -13,32 +13,32 @@ import java.util.List; /** - * The ExtendedErrorInfo model. + * Error information. */ @Fluent public final class ExtendedErrorInfo implements JsonSerializable { /* - * The code property. + * The error code. */ private String code; /* - * The target property. + * The target of the error. */ private String target; /* - * The message property. + * The error message. */ private String message; /* - * The details property. + * The error details. */ private List details; /* - * The additionalInfo property. + * The additional error information. */ private List additionalInfo; @@ -49,7 +49,7 @@ public ExtendedErrorInfo() { } /** - * Get the code property: The code property. + * Get the code property: The error code. * * @return the code value. */ @@ -58,7 +58,7 @@ public String code() { } /** - * Set the code property: The code property. + * Set the code property: The error code. * * @param code the code value to set. * @return the ExtendedErrorInfo object itself. @@ -69,7 +69,7 @@ public ExtendedErrorInfo withCode(String code) { } /** - * Get the target property: The target property. + * Get the target property: The target of the error. * * @return the target value. */ @@ -78,7 +78,7 @@ public String target() { } /** - * Set the target property: The target property. + * Set the target property: The target of the error. * * @param target the target value to set. * @return the ExtendedErrorInfo object itself. @@ -89,7 +89,7 @@ public ExtendedErrorInfo withTarget(String target) { } /** - * Get the message property: The message property. + * Get the message property: The error message. * * @return the message value. */ @@ -98,7 +98,7 @@ public String message() { } /** - * Set the message property: The message property. + * Set the message property: The error message. * * @param message the message value to set. * @return the ExtendedErrorInfo object itself. @@ -109,7 +109,7 @@ public ExtendedErrorInfo withMessage(String message) { } /** - * Get the details property: The details property. + * Get the details property: The error details. * * @return the details value. */ @@ -118,7 +118,7 @@ public List details() { } /** - * Set the details property: The details property. + * Set the details property: The error details. * * @param details the details value to set. * @return the ExtendedErrorInfo object itself. @@ -129,7 +129,7 @@ public ExtendedErrorInfo withDetails(List details) { } /** - * Get the additionalInfo property: The additionalInfo property. + * Get the additionalInfo property: The additional error information. * * @return the additionalInfo value. */ @@ -138,7 +138,7 @@ public List additionalInfo() { } /** - * Set the additionalInfo property: The additionalInfo property. + * Set the additionalInfo property: The additional error information. * * @param additionalInfo the additionalInfo value to set. * @return the ExtendedErrorInfo object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationOptions.java index 0488b2c20f68..63926a139a72 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationOptions.java @@ -17,14 +17,14 @@ @Fluent public final class ExtendedLocationOptions implements JsonSerializable { /* - * The type property. + * The type. */ - private String type; + private ExtendedLocationType type; /* * The supportedPolicy property. */ - private String supportedPolicy; + private ResourceTypeExtendedLocationPolicy supportedPolicy; /** * Creates an instance of ExtendedLocationOptions class. @@ -33,21 +33,21 @@ public ExtendedLocationOptions() { } /** - * Get the type property: The type property. + * Get the type property: The type. * * @return the type value. */ - public String type() { + public ExtendedLocationType type() { return this.type; } /** - * Set the type property: The type property. + * Set the type property: The type. * * @param type the type value to set. * @return the ExtendedLocationOptions object itself. */ - public ExtendedLocationOptions withType(String type) { + public ExtendedLocationOptions withType(ExtendedLocationType type) { this.type = type; return this; } @@ -57,7 +57,7 @@ public ExtendedLocationOptions withType(String type) { * * @return the supportedPolicy value. */ - public String supportedPolicy() { + public ResourceTypeExtendedLocationPolicy supportedPolicy() { return this.supportedPolicy; } @@ -67,7 +67,7 @@ public String supportedPolicy() { * @param supportedPolicy the supportedPolicy value to set. * @return the ExtendedLocationOptions object itself. */ - public ExtendedLocationOptions withSupportedPolicy(String supportedPolicy) { + public ExtendedLocationOptions withSupportedPolicy(ResourceTypeExtendedLocationPolicy supportedPolicy) { this.supportedPolicy = supportedPolicy; return this; } @@ -86,8 +86,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("supportedPolicy", this.supportedPolicy); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("supportedPolicy", + this.supportedPolicy == null ? null : this.supportedPolicy.toString()); return jsonWriter.writeEndObject(); } @@ -107,9 +108,10 @@ public static ExtendedLocationOptions fromJson(JsonReader jsonReader) throws IOE reader.nextToken(); if ("type".equals(fieldName)) { - deserializedExtendedLocationOptions.type = reader.getString(); + deserializedExtendedLocationOptions.type = ExtendedLocationType.fromString(reader.getString()); } else if ("supportedPolicy".equals(fieldName)) { - deserializedExtendedLocationOptions.supportedPolicy = reader.getString(); + deserializedExtendedLocationOptions.supportedPolicy + = ResourceTypeExtendedLocationPolicy.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationType.java index 9f761261fda3..6e524732c3a0 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtendedLocationType.java @@ -4,58 +4,58 @@ package com.azure.resourcemanager.providerhub.models; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + /** - * Defines values for ExtendedLocationType. + * The extended location type. */ -public enum ExtendedLocationType { +public final class ExtendedLocationType extends ExpandableStringEnum { /** - * Enum value NotSpecified. + * Static value NotSpecified for ExtendedLocationType. */ - NOT_SPECIFIED("NotSpecified"), + public static final ExtendedLocationType NOT_SPECIFIED = fromString("NotSpecified"); /** - * Enum value EdgeZone. + * Static value CustomLocation for ExtendedLocationType. */ - EDGE_ZONE("EdgeZone"), + public static final ExtendedLocationType CUSTOM_LOCATION = fromString("CustomLocation"); /** - * Enum value ArcZone. + * Static value EdgeZone for ExtendedLocationType. */ - ARC_ZONE("ArcZone"); + public static final ExtendedLocationType EDGE_ZONE = fromString("EdgeZone"); /** - * The actual serialized value for a ExtendedLocationType instance. + * Static value ArcZone for ExtendedLocationType. */ - private final String value; + public static final ExtendedLocationType ARC_ZONE = fromString("ArcZone"); - ExtendedLocationType(String value) { - this.value = value; + /** + * Creates a new instance of ExtendedLocationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtendedLocationType() { } /** - * Parses a serialized value to a ExtendedLocationType instance. + * Creates or finds a ExtendedLocationType from its string representation. * - * @param value the serialized value to parse. - * @return the parsed ExtendedLocationType object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding ExtendedLocationType. */ - public static ExtendedLocationType fromString(String value) { - if (value == null) { - return null; - } - ExtendedLocationType[] items = ExtendedLocationType.values(); - for (ExtendedLocationType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static ExtendedLocationType fromString(String name) { + return fromString(name, ExtendedLocationType.class); } /** - * {@inheritDoc} + * Gets known ExtendedLocationType values. + * + * @return known ExtendedLocationType values. */ - @Override - public String toString() { - return this.value; + public static Collection values() { + return values(ExtendedLocationType.class); } } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtensionCategory.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtensionCategory.java index 8fa81f33b29c..337d1984ab61 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtensionCategory.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ExtensionCategory.java @@ -92,6 +92,17 @@ public final class ExtensionCategory extends ExpandableStringEnum { /* - * The request property. + * The request. */ private List request; /* - * The response property. + * The response. */ private List response; @@ -34,7 +34,7 @@ public ExtensionOptions() { } /** - * Get the request property: The request property. + * Get the request property: The request. * * @return the request value. */ @@ -43,7 +43,7 @@ public List request() { } /** - * Set the request property: The request property. + * Set the request property: The request. * * @param request the request value to set. * @return the ExtensionOptions object itself. @@ -54,7 +54,7 @@ public ExtensionOptions withRequest(List request) { } /** - * Get the response property: The response property. + * Get the response property: The response. * * @return the response value. */ @@ -63,7 +63,7 @@ public List response() { } /** - * Set the response property: The response property. + * Set the response property: The response. * * @param response the response value to set. * @return the ExtensionOptions object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRule.java new file mode 100644 index 000000000000..39dceca6866e --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRule.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The FanoutLinkedNotificationRule model. + */ +@Fluent +public final class FanoutLinkedNotificationRule implements JsonSerializable { + /* + * The token auth configuration. + */ + private TokenAuthConfiguration tokenAuthConfiguration; + + /* + * The actions. + */ + private List actions; + + /* + * The endpoints. + */ + private List endpoints; + + /* + * The dsts configuration. + */ + private FanoutLinkedNotificationRuleDstsConfiguration dstsConfiguration; + + /** + * Creates an instance of FanoutLinkedNotificationRule class. + */ + public FanoutLinkedNotificationRule() { + } + + /** + * Get the tokenAuthConfiguration property: The token auth configuration. + * + * @return the tokenAuthConfiguration value. + */ + public TokenAuthConfiguration tokenAuthConfiguration() { + return this.tokenAuthConfiguration; + } + + /** + * Set the tokenAuthConfiguration property: The token auth configuration. + * + * @param tokenAuthConfiguration the tokenAuthConfiguration value to set. + * @return the FanoutLinkedNotificationRule object itself. + */ + public FanoutLinkedNotificationRule withTokenAuthConfiguration(TokenAuthConfiguration tokenAuthConfiguration) { + this.tokenAuthConfiguration = tokenAuthConfiguration; + return this; + } + + /** + * Get the actions property: The actions. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: The actions. + * + * @param actions the actions value to set. + * @return the FanoutLinkedNotificationRule object itself. + */ + public FanoutLinkedNotificationRule withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the endpoints property: The endpoints. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The endpoints. + * + * @param endpoints the endpoints value to set. + * @return the FanoutLinkedNotificationRule object itself. + */ + public FanoutLinkedNotificationRule withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the dstsConfiguration property: The dsts configuration. + * + * @return the dstsConfiguration value. + */ + public FanoutLinkedNotificationRuleDstsConfiguration dstsConfiguration() { + return this.dstsConfiguration; + } + + /** + * Set the dstsConfiguration property: The dsts configuration. + * + * @param dstsConfiguration the dstsConfiguration value to set. + * @return the FanoutLinkedNotificationRule object itself. + */ + public FanoutLinkedNotificationRule + withDstsConfiguration(FanoutLinkedNotificationRuleDstsConfiguration dstsConfiguration) { + this.dstsConfiguration = dstsConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (tokenAuthConfiguration() != null) { + tokenAuthConfiguration().validate(); + } + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + if (dstsConfiguration() != null) { + dstsConfiguration().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("tokenAuthConfiguration", this.tokenAuthConfiguration); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("dstsConfiguration", this.dstsConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FanoutLinkedNotificationRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FanoutLinkedNotificationRule 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 FanoutLinkedNotificationRule. + */ + public static FanoutLinkedNotificationRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FanoutLinkedNotificationRule deserializedFanoutLinkedNotificationRule = new FanoutLinkedNotificationRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tokenAuthConfiguration".equals(fieldName)) { + deserializedFanoutLinkedNotificationRule.tokenAuthConfiguration + = TokenAuthConfiguration.fromJson(reader); + } else if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> reader1.getString()); + deserializedFanoutLinkedNotificationRule.actions = actions; + } else if ("endpoints".equals(fieldName)) { + List endpoints + = reader.readArray(reader1 -> ResourceProviderEndpoint.fromJson(reader1)); + deserializedFanoutLinkedNotificationRule.endpoints = endpoints; + } else if ("dstsConfiguration".equals(fieldName)) { + deserializedFanoutLinkedNotificationRule.dstsConfiguration + = FanoutLinkedNotificationRuleDstsConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFanoutLinkedNotificationRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRuleDstsConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRuleDstsConfiguration.java new file mode 100644 index 000000000000..c6a54c509cb0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FanoutLinkedNotificationRuleDstsConfiguration.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The dsts configuration. + */ +@Fluent +public final class FanoutLinkedNotificationRuleDstsConfiguration extends DstsConfiguration { + /** + * Creates an instance of FanoutLinkedNotificationRuleDstsConfiguration class. + */ + public FanoutLinkedNotificationRuleDstsConfiguration() { + } + + /** + * {@inheritDoc} + */ + @Override + public FanoutLinkedNotificationRuleDstsConfiguration withServiceName(String serviceName) { + super.withServiceName(serviceName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FanoutLinkedNotificationRuleDstsConfiguration withServiceDnsName(String serviceDnsName) { + super.withServiceDnsName(serviceDnsName); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (serviceName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceName in model FanoutLinkedNotificationRuleDstsConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FanoutLinkedNotificationRuleDstsConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", serviceName()); + jsonWriter.writeStringField("serviceDnsName", serviceDnsName()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FanoutLinkedNotificationRuleDstsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FanoutLinkedNotificationRuleDstsConfiguration 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 FanoutLinkedNotificationRuleDstsConfiguration. + */ + public static FanoutLinkedNotificationRuleDstsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FanoutLinkedNotificationRuleDstsConfiguration deserializedFanoutLinkedNotificationRuleDstsConfiguration + = new FanoutLinkedNotificationRuleDstsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedFanoutLinkedNotificationRuleDstsConfiguration.withServiceName(reader.getString()); + } else if ("serviceDnsName".equals(fieldName)) { + deserializedFanoutLinkedNotificationRuleDstsConfiguration.withServiceDnsName(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFanoutLinkedNotificationRuleDstsConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesPolicy.java index 25d69cc1f882..bb650ff4a361 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesPolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesPolicy.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for FeaturesPolicy. + * The required feature policy. */ public final class FeaturesPolicy extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesRule.java index d0c1277706e4..9c3d10dee665 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FeaturesRule.java @@ -18,7 +18,7 @@ @Fluent public class FeaturesRule implements JsonSerializable { /* - * The requiredFeaturesPolicy property. + * The required feature policy. */ private FeaturesPolicy requiredFeaturesPolicy; @@ -29,7 +29,7 @@ public FeaturesRule() { } /** - * Get the requiredFeaturesPolicy property: The requiredFeaturesPolicy property. + * Get the requiredFeaturesPolicy property: The required feature policy. * * @return the requiredFeaturesPolicy value. */ @@ -38,7 +38,7 @@ public FeaturesPolicy requiredFeaturesPolicy() { } /** - * Set the requiredFeaturesPolicy property: The requiredFeaturesPolicy property. + * Set the requiredFeaturesPolicy property: The required feature policy. * * @param requiredFeaturesPolicy the requiredFeaturesPolicy value to set. * @return the FeaturesRule object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterOption.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterOption.java new file mode 100644 index 000000000000..4a082affd1e7 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterOption.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Filter option. + */ +public final class FilterOption extends ExpandableStringEnum { + /** + * Static value NotSpecified for FilterOption. + */ + public static final FilterOption NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value EnableSubscriptionFilterOnTenant for FilterOption. + */ + public static final FilterOption ENABLE_SUBSCRIPTION_FILTER_ON_TENANT + = fromString("EnableSubscriptionFilterOnTenant"); + + /** + * Creates a new instance of FilterOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FilterOption() { + } + + /** + * Creates or finds a FilterOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding FilterOption. + */ + public static FilterOption fromString(String name) { + return fromString(name, FilterOption.class); + } + + /** + * Gets known FilterOption values. + * + * @return known FilterOption values. + */ + public static Collection values() { + return values(FilterOption.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterRule.java new file mode 100644 index 000000000000..33fb3768495d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FilterRule.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The FilterRule model. + */ +@Fluent +public final class FilterRule implements JsonSerializable { + /* + * The filter query. + */ + private String filterQuery; + + /* + * The endpoint information. + */ + private List endpointInformation; + + /** + * Creates an instance of FilterRule class. + */ + public FilterRule() { + } + + /** + * Get the filterQuery property: The filter query. + * + * @return the filterQuery value. + */ + public String filterQuery() { + return this.filterQuery; + } + + /** + * Set the filterQuery property: The filter query. + * + * @param filterQuery the filterQuery value to set. + * @return the FilterRule object itself. + */ + public FilterRule withFilterQuery(String filterQuery) { + this.filterQuery = filterQuery; + return this; + } + + /** + * Get the endpointInformation property: The endpoint information. + * + * @return the endpointInformation value. + */ + public List endpointInformation() { + return this.endpointInformation; + } + + /** + * Set the endpointInformation property: The endpoint information. + * + * @param endpointInformation the endpointInformation value to set. + * @return the FilterRule object itself. + */ + public FilterRule withEndpointInformation(List endpointInformation) { + this.endpointInformation = endpointInformation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpointInformation() != null) { + endpointInformation().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filterQuery", this.filterQuery); + jsonWriter.writeArrayField("endpointInformation", this.endpointInformation, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FilterRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FilterRule 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 FilterRule. + */ + public static FilterRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FilterRule deserializedFilterRule = new FilterRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filterQuery".equals(fieldName)) { + deserializedFilterRule.filterQuery = reader.getString(); + } else if ("endpointInformation".equals(fieldName)) { + List endpointInformation + = reader.readArray(reader1 -> EndpointInformation.fromJson(reader1)); + deserializedFilterRule.endpointInformation = endpointInformation; + } else { + reader.skipChildren(); + } + } + + return deserializedFilterRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontdoorRequestMode.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontdoorRequestMode.java new file mode 100644 index 000000000000..99c0df882ec4 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontdoorRequestMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The frontdoor request mode. + */ +public final class FrontdoorRequestMode extends ExpandableStringEnum { + /** + * Static value NotSpecified for FrontdoorRequestMode. + */ + public static final FrontdoorRequestMode NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value UseManifest for FrontdoorRequestMode. + */ + public static final FrontdoorRequestMode USE_MANIFEST = fromString("UseManifest"); + + /** + * Creates a new instance of FrontdoorRequestMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FrontdoorRequestMode() { + } + + /** + * Creates or finds a FrontdoorRequestMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding FrontdoorRequestMode. + */ + public static FrontdoorRequestMode fromString(String name) { + return fromString(name, FrontdoorRequestMode.class); + } + + /** + * Gets known FrontdoorRequestMode values. + * + * @return known FrontdoorRequestMode values. + */ + public static Collection values() { + return values(FrontdoorRequestMode.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayload.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayload.java new file mode 100644 index 000000000000..9671ff14d420 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayload.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The FrontloadPayload model. + */ +@Fluent +public final class FrontloadPayload implements JsonSerializable { + /* + * Properties of the frontload payload. + */ + private FrontloadPayloadProperties properties; + + /** + * Creates an instance of FrontloadPayload class. + */ + public FrontloadPayload() { + } + + /** + * Get the properties property: Properties of the frontload payload. + * + * @return the properties value. + */ + public FrontloadPayloadProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of the frontload payload. + * + * @param properties the properties value to set. + * @return the FrontloadPayload object itself. + */ + public FrontloadPayload withProperties(FrontloadPayloadProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model FrontloadPayload")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FrontloadPayload.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FrontloadPayload from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FrontloadPayload 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 FrontloadPayload. + */ + public static FrontloadPayload fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FrontloadPayload deserializedFrontloadPayload = new FrontloadPayload(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedFrontloadPayload.properties = FrontloadPayloadProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFrontloadPayload; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadProperties.java new file mode 100644 index 000000000000..613a05b05ad7 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadProperties.java @@ -0,0 +1,450 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The FrontloadPayloadProperties model. + */ +@Fluent +public final class FrontloadPayloadProperties implements JsonSerializable { + /* + * The operation type. + */ + private String operationType; + + /* + * The provider namespace. + */ + private String providerNamespace; + + /* + * The frontload location. + */ + private String frontloadLocation; + + /* + * The copy from location. + */ + private String copyFromLocation; + + /* + * The environment type. + */ + private AvailableCheckInManifestEnvironment environmentType; + + /* + * The service feature flag. + */ + private ServiceFeatureFlagAction serviceFeatureFlag; + + /* + * The resource types to include. + */ + private List includeResourceTypes; + + /* + * The resource types to exclude. + */ + private List excludeResourceTypes; + + /* + * The manifest level fields to override. + */ + private FrontloadPayloadPropertiesOverrideManifestLevelFields overrideManifestLevelFields; + + /* + * The endpoint level fields to override. + */ + private FrontloadPayloadPropertiesOverrideEndpointLevelFields overrideEndpointLevelFields; + + /* + * The fields to ignore. + */ + private List ignoreFields; + + /** + * Creates an instance of FrontloadPayloadProperties class. + */ + public FrontloadPayloadProperties() { + } + + /** + * Get the operationType property: The operation type. + * + * @return the operationType value. + */ + public String operationType() { + return this.operationType; + } + + /** + * Set the operationType property: The operation type. + * + * @param operationType the operationType value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withOperationType(String operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the providerNamespace property: The provider namespace. + * + * @return the providerNamespace value. + */ + public String providerNamespace() { + return this.providerNamespace; + } + + /** + * Set the providerNamespace property: The provider namespace. + * + * @param providerNamespace the providerNamespace value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withProviderNamespace(String providerNamespace) { + this.providerNamespace = providerNamespace; + return this; + } + + /** + * Get the frontloadLocation property: The frontload location. + * + * @return the frontloadLocation value. + */ + public String frontloadLocation() { + return this.frontloadLocation; + } + + /** + * Set the frontloadLocation property: The frontload location. + * + * @param frontloadLocation the frontloadLocation value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withFrontloadLocation(String frontloadLocation) { + this.frontloadLocation = frontloadLocation; + return this; + } + + /** + * Get the copyFromLocation property: The copy from location. + * + * @return the copyFromLocation value. + */ + public String copyFromLocation() { + return this.copyFromLocation; + } + + /** + * Set the copyFromLocation property: The copy from location. + * + * @param copyFromLocation the copyFromLocation value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withCopyFromLocation(String copyFromLocation) { + this.copyFromLocation = copyFromLocation; + return this; + } + + /** + * Get the environmentType property: The environment type. + * + * @return the environmentType value. + */ + public AvailableCheckInManifestEnvironment environmentType() { + return this.environmentType; + } + + /** + * Set the environmentType property: The environment type. + * + * @param environmentType the environmentType value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withEnvironmentType(AvailableCheckInManifestEnvironment environmentType) { + this.environmentType = environmentType; + return this; + } + + /** + * Get the serviceFeatureFlag property: The service feature flag. + * + * @return the serviceFeatureFlag value. + */ + public ServiceFeatureFlagAction serviceFeatureFlag() { + return this.serviceFeatureFlag; + } + + /** + * Set the serviceFeatureFlag property: The service feature flag. + * + * @param serviceFeatureFlag the serviceFeatureFlag value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withServiceFeatureFlag(ServiceFeatureFlagAction serviceFeatureFlag) { + this.serviceFeatureFlag = serviceFeatureFlag; + return this; + } + + /** + * Get the includeResourceTypes property: The resource types to include. + * + * @return the includeResourceTypes value. + */ + public List includeResourceTypes() { + return this.includeResourceTypes; + } + + /** + * Set the includeResourceTypes property: The resource types to include. + * + * @param includeResourceTypes the includeResourceTypes value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withIncludeResourceTypes(List includeResourceTypes) { + this.includeResourceTypes = includeResourceTypes; + return this; + } + + /** + * Get the excludeResourceTypes property: The resource types to exclude. + * + * @return the excludeResourceTypes value. + */ + public List excludeResourceTypes() { + return this.excludeResourceTypes; + } + + /** + * Set the excludeResourceTypes property: The resource types to exclude. + * + * @param excludeResourceTypes the excludeResourceTypes value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withExcludeResourceTypes(List excludeResourceTypes) { + this.excludeResourceTypes = excludeResourceTypes; + return this; + } + + /** + * Get the overrideManifestLevelFields property: The manifest level fields to override. + * + * @return the overrideManifestLevelFields value. + */ + public FrontloadPayloadPropertiesOverrideManifestLevelFields overrideManifestLevelFields() { + return this.overrideManifestLevelFields; + } + + /** + * Set the overrideManifestLevelFields property: The manifest level fields to override. + * + * @param overrideManifestLevelFields the overrideManifestLevelFields value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withOverrideManifestLevelFields( + FrontloadPayloadPropertiesOverrideManifestLevelFields overrideManifestLevelFields) { + this.overrideManifestLevelFields = overrideManifestLevelFields; + return this; + } + + /** + * Get the overrideEndpointLevelFields property: The endpoint level fields to override. + * + * @return the overrideEndpointLevelFields value. + */ + public FrontloadPayloadPropertiesOverrideEndpointLevelFields overrideEndpointLevelFields() { + return this.overrideEndpointLevelFields; + } + + /** + * Set the overrideEndpointLevelFields property: The endpoint level fields to override. + * + * @param overrideEndpointLevelFields the overrideEndpointLevelFields value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withOverrideEndpointLevelFields( + FrontloadPayloadPropertiesOverrideEndpointLevelFields overrideEndpointLevelFields) { + this.overrideEndpointLevelFields = overrideEndpointLevelFields; + return this; + } + + /** + * Get the ignoreFields property: The fields to ignore. + * + * @return the ignoreFields value. + */ + public List ignoreFields() { + return this.ignoreFields; + } + + /** + * Set the ignoreFields property: The fields to ignore. + * + * @param ignoreFields the ignoreFields value to set. + * @return the FrontloadPayloadProperties object itself. + */ + public FrontloadPayloadProperties withIgnoreFields(List ignoreFields) { + this.ignoreFields = ignoreFields; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (operationType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operationType in model FrontloadPayloadProperties")); + } + if (providerNamespace() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property providerNamespace in model FrontloadPayloadProperties")); + } + if (frontloadLocation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property frontloadLocation in model FrontloadPayloadProperties")); + } + if (copyFromLocation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property copyFromLocation in model FrontloadPayloadProperties")); + } + if (environmentType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property environmentType in model FrontloadPayloadProperties")); + } + if (serviceFeatureFlag() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceFeatureFlag in model FrontloadPayloadProperties")); + } + if (includeResourceTypes() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property includeResourceTypes in model FrontloadPayloadProperties")); + } + if (excludeResourceTypes() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property excludeResourceTypes in model FrontloadPayloadProperties")); + } + if (overrideManifestLevelFields() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property overrideManifestLevelFields in model FrontloadPayloadProperties")); + } else { + overrideManifestLevelFields().validate(); + } + if (overrideEndpointLevelFields() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property overrideEndpointLevelFields in model FrontloadPayloadProperties")); + } else { + overrideEndpointLevelFields().validate(); + } + if (ignoreFields() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ignoreFields in model FrontloadPayloadProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FrontloadPayloadProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("operationType", this.operationType); + jsonWriter.writeStringField("providerNamespace", this.providerNamespace); + jsonWriter.writeStringField("frontloadLocation", this.frontloadLocation); + jsonWriter.writeStringField("copyFromLocation", this.copyFromLocation); + jsonWriter.writeStringField("environmentType", + this.environmentType == null ? null : this.environmentType.toString()); + jsonWriter.writeStringField("serviceFeatureFlag", + this.serviceFeatureFlag == null ? null : this.serviceFeatureFlag.toString()); + jsonWriter.writeArrayField("includeResourceTypes", this.includeResourceTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("excludeResourceTypes", this.excludeResourceTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("overrideManifestLevelFields", this.overrideManifestLevelFields); + jsonWriter.writeJsonField("overrideEndpointLevelFields", this.overrideEndpointLevelFields); + jsonWriter.writeArrayField("ignoreFields", this.ignoreFields, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FrontloadPayloadProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FrontloadPayloadProperties 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 FrontloadPayloadProperties. + */ + public static FrontloadPayloadProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FrontloadPayloadProperties deserializedFrontloadPayloadProperties = new FrontloadPayloadProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("operationType".equals(fieldName)) { + deserializedFrontloadPayloadProperties.operationType = reader.getString(); + } else if ("providerNamespace".equals(fieldName)) { + deserializedFrontloadPayloadProperties.providerNamespace = reader.getString(); + } else if ("frontloadLocation".equals(fieldName)) { + deserializedFrontloadPayloadProperties.frontloadLocation = reader.getString(); + } else if ("copyFromLocation".equals(fieldName)) { + deserializedFrontloadPayloadProperties.copyFromLocation = reader.getString(); + } else if ("environmentType".equals(fieldName)) { + deserializedFrontloadPayloadProperties.environmentType + = AvailableCheckInManifestEnvironment.fromString(reader.getString()); + } else if ("serviceFeatureFlag".equals(fieldName)) { + deserializedFrontloadPayloadProperties.serviceFeatureFlag + = ServiceFeatureFlagAction.fromString(reader.getString()); + } else if ("includeResourceTypes".equals(fieldName)) { + List includeResourceTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedFrontloadPayloadProperties.includeResourceTypes = includeResourceTypes; + } else if ("excludeResourceTypes".equals(fieldName)) { + List excludeResourceTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedFrontloadPayloadProperties.excludeResourceTypes = excludeResourceTypes; + } else if ("overrideManifestLevelFields".equals(fieldName)) { + deserializedFrontloadPayloadProperties.overrideManifestLevelFields + = FrontloadPayloadPropertiesOverrideManifestLevelFields.fromJson(reader); + } else if ("overrideEndpointLevelFields".equals(fieldName)) { + deserializedFrontloadPayloadProperties.overrideEndpointLevelFields + = FrontloadPayloadPropertiesOverrideEndpointLevelFields.fromJson(reader); + } else if ("ignoreFields".equals(fieldName)) { + List ignoreFields = reader.readArray(reader1 -> reader1.getString()); + deserializedFrontloadPayloadProperties.ignoreFields = ignoreFields; + } else { + reader.skipChildren(); + } + } + + return deserializedFrontloadPayloadProperties; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideEndpointLevelFields.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideEndpointLevelFields.java new file mode 100644 index 000000000000..0f81407f9819 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideEndpointLevelFields.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.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.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.Duration; +import java.util.List; + +/** + * The endpoint level fields to override. + */ +@Fluent +public final class FrontloadPayloadPropertiesOverrideEndpointLevelFields extends ResourceTypeEndpointBase { + /** + * Creates an instance of FrontloadPayloadPropertiesOverrideEndpointLevelFields class. + */ + public FrontloadPayloadPropertiesOverrideEndpointLevelFields() { + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withEnabled(boolean enabled) { + super.withEnabled(enabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withApiVersions(List apiVersions) { + super.withApiVersions(apiVersions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withLocations(List locations) { + super.withLocations(locations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withRequiredFeatures(List requiredFeatures) { + super.withRequiredFeatures(requiredFeatures); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields + withFeaturesRule(ResourceTypeEndpointBaseFeaturesRule featuresRule) { + super.withFeaturesRule(featuresRule); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withTimeout(Duration timeout) { + super.withTimeout(timeout); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withEndpointType(EndpointType endpointType) { + super.withEndpointType(endpointType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields + withDstsConfiguration(ResourceTypeEndpointBaseDstsConfiguration dstsConfiguration) { + super.withDstsConfiguration(dstsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withSkuLink(String skuLink) { + super.withSkuLink(skuLink); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withApiVersion(String apiVersion) { + super.withApiVersion(apiVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideEndpointLevelFields withZones(List zones) { + super.withZones(zones); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (apiVersions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property apiVersions in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (endpointUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property endpointUri in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (locations() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property locations in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (requiredFeatures() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property requiredFeatures in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (featuresRule() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property featuresRule in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } else { + featuresRule().validate(); + } + if (timeout() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property timeout in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (endpointType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property endpointType in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (dstsConfiguration() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dstsConfiguration in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } else { + dstsConfiguration().validate(); + } + if (skuLink() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property skuLink in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (apiVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property apiVersion in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + if (zones() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property zones in model FrontloadPayloadPropertiesOverrideEndpointLevelFields")); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(FrontloadPayloadPropertiesOverrideEndpointLevelFields.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", enabled()); + jsonWriter.writeArrayField("apiVersions", apiVersions(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeArrayField("locations", locations(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("requiredFeatures", requiredFeatures(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("featuresRule", featuresRule()); + jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(timeout())); + jsonWriter.writeStringField("endpointType", endpointType() == null ? null : endpointType().toString()); + jsonWriter.writeJsonField("dstsConfiguration", dstsConfiguration()); + jsonWriter.writeStringField("skuLink", skuLink()); + jsonWriter.writeStringField("apiVersion", apiVersion()); + jsonWriter.writeArrayField("zones", zones(), (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FrontloadPayloadPropertiesOverrideEndpointLevelFields from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FrontloadPayloadPropertiesOverrideEndpointLevelFields 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 FrontloadPayloadPropertiesOverrideEndpointLevelFields. + */ + public static FrontloadPayloadPropertiesOverrideEndpointLevelFields fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + FrontloadPayloadPropertiesOverrideEndpointLevelFields deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + = new FrontloadPayloadPropertiesOverrideEndpointLevelFields(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields.withEnabled(reader.getBoolean()); + } else if ("apiVersions".equals(fieldName)) { + List apiVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields.withApiVersions(apiVersions); + } else if ("endpointUri".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + .withEndpointUri(reader.getString()); + } else if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields.withLocations(locations); + } else if ("requiredFeatures".equals(fieldName)) { + List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + .withRequiredFeatures(requiredFeatures); + } else if ("featuresRule".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + .withFeaturesRule(ResourceTypeEndpointBaseFeaturesRule.fromJson(reader)); + } else if ("timeout".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + .withTimeout(reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); + } else if ("endpointType".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + .withEndpointType(EndpointType.fromString(reader.getString())); + } else if ("dstsConfiguration".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + .withDstsConfiguration(ResourceTypeEndpointBaseDstsConfiguration.fromJson(reader)); + } else if ("skuLink".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields.withSkuLink(reader.getString()); + } else if ("apiVersion".equals(fieldName)) { + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields + .withApiVersion(reader.getString()); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields.withZones(zones); + } else { + reader.skipChildren(); + } + } + + return deserializedFrontloadPayloadPropertiesOverrideEndpointLevelFields; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideManifestLevelFields.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideManifestLevelFields.java new file mode 100644 index 000000000000..2dea70a962b2 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/FrontloadPayloadPropertiesOverrideManifestLevelFields.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The manifest level fields to override. + */ +@Fluent +public final class FrontloadPayloadPropertiesOverrideManifestLevelFields extends ManifestLevelPropertyBag { + /** + * Creates an instance of FrontloadPayloadPropertiesOverrideManifestLevelFields class. + */ + public FrontloadPayloadPropertiesOverrideManifestLevelFields() { + } + + /** + * {@inheritDoc} + */ + @Override + public FrontloadPayloadPropertiesOverrideManifestLevelFields + withResourceHydrationAccounts(List resourceHydrationAccounts) { + super.withResourceHydrationAccounts(resourceHydrationAccounts); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (resourceHydrationAccounts() != null) { + resourceHydrationAccounts().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resourceHydrationAccounts", resourceHydrationAccounts(), + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FrontloadPayloadPropertiesOverrideManifestLevelFields from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FrontloadPayloadPropertiesOverrideManifestLevelFields 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 FrontloadPayloadPropertiesOverrideManifestLevelFields. + */ + public static FrontloadPayloadPropertiesOverrideManifestLevelFields fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + FrontloadPayloadPropertiesOverrideManifestLevelFields deserializedFrontloadPayloadPropertiesOverrideManifestLevelFields + = new FrontloadPayloadPropertiesOverrideManifestLevelFields(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceHydrationAccounts".equals(fieldName)) { + List resourceHydrationAccounts + = reader.readArray(reader1 -> ResourceHydrationAccount.fromJson(reader1)); + deserializedFrontloadPayloadPropertiesOverrideManifestLevelFields + .withResourceHydrationAccounts(resourceHydrationAccounts); + } else { + reader.skipChildren(); + } + } + + return deserializedFrontloadPayloadPropertiesOverrideManifestLevelFields; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagement.java index 5948ab9be041..aec11cbfb1ff 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagement.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagement.java @@ -17,7 +17,7 @@ @Fluent public class IdentityManagement implements JsonSerializable { /* - * The type property. + * The type. */ private IdentityManagementTypes type; @@ -28,7 +28,7 @@ public IdentityManagement() { } /** - * Get the type property: The type property. + * Get the type property: The type. * * @return the type value. */ @@ -37,7 +37,7 @@ public IdentityManagementTypes type() { } /** - * Set the type property: The type property. + * Set the type property: The type. * * @param type the type value to set. * @return the IdentityManagement object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementProperties.java index 33fa4cea7544..1e2e58e22ba0 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementProperties.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * The IdentityManagementProperties model. @@ -17,15 +18,25 @@ @Fluent public class IdentityManagementProperties implements JsonSerializable { /* - * The type property. + * The type. */ private IdentityManagementTypes type; /* - * The applicationId property. + * The application id. */ private String applicationId; + /* + * The application ids. + */ + private List applicationIds; + + /* + * The delegation app ids. + */ + private List delegationAppIds; + /** * Creates an instance of IdentityManagementProperties class. */ @@ -33,7 +44,7 @@ public IdentityManagementProperties() { } /** - * Get the type property: The type property. + * Get the type property: The type. * * @return the type value. */ @@ -42,7 +53,7 @@ public IdentityManagementTypes type() { } /** - * Set the type property: The type property. + * Set the type property: The type. * * @param type the type value to set. * @return the IdentityManagementProperties object itself. @@ -53,7 +64,7 @@ public IdentityManagementProperties withType(IdentityManagementTypes type) { } /** - * Get the applicationId property: The applicationId property. + * Get the applicationId property: The application id. * * @return the applicationId value. */ @@ -62,7 +73,7 @@ public String applicationId() { } /** - * Set the applicationId property: The applicationId property. + * Set the applicationId property: The application id. * * @param applicationId the applicationId value to set. * @return the IdentityManagementProperties object itself. @@ -72,6 +83,46 @@ public IdentityManagementProperties withApplicationId(String applicationId) { return this; } + /** + * Get the applicationIds property: The application ids. + * + * @return the applicationIds value. + */ + public List applicationIds() { + return this.applicationIds; + } + + /** + * Set the applicationIds property: The application ids. + * + * @param applicationIds the applicationIds value to set. + * @return the IdentityManagementProperties object itself. + */ + public IdentityManagementProperties withApplicationIds(List applicationIds) { + this.applicationIds = applicationIds; + return this; + } + + /** + * Get the delegationAppIds property: The delegation app ids. + * + * @return the delegationAppIds value. + */ + public List delegationAppIds() { + return this.delegationAppIds; + } + + /** + * Set the delegationAppIds property: The delegation app ids. + * + * @param delegationAppIds the delegationAppIds value to set. + * @return the IdentityManagementProperties object itself. + */ + public IdentityManagementProperties withDelegationAppIds(List delegationAppIds) { + this.delegationAppIds = delegationAppIds; + return this; + } + /** * Validates the instance. * @@ -88,6 +139,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("applicationId", this.applicationId); + jsonWriter.writeArrayField("applicationIds", this.applicationIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("delegationAppIds", this.delegationAppIds, + (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -111,6 +166,12 @@ public static IdentityManagementProperties fromJson(JsonReader jsonReader) throw = IdentityManagementTypes.fromString(reader.getString()); } else if ("applicationId".equals(fieldName)) { deserializedIdentityManagementProperties.applicationId = reader.getString(); + } else if ("applicationIds".equals(fieldName)) { + List applicationIds = reader.readArray(reader1 -> reader1.getString()); + deserializedIdentityManagementProperties.applicationIds = applicationIds; + } else if ("delegationAppIds".equals(fieldName)) { + List delegationAppIds = reader.readArray(reader1 -> reader1.getString()); + deserializedIdentityManagementProperties.delegationAppIds = delegationAppIds; } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementTypes.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementTypes.java index 014b1aa34fea..eae6307bd445 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementTypes.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/IdentityManagementTypes.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for IdentityManagementTypes. + * The type. */ public final class IdentityManagementTypes extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/InnerError.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/InnerError.java deleted file mode 100644 index 9050c0beacd8..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/InnerError.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * Inner error containing list of errors. - */ -@Fluent -public class InnerError implements JsonSerializable { - /* - * Specific error code than was provided by the containing error. - */ - private String code; - - /* - * Object containing more specific information than the current object about the error. - */ - private Object innerError; - - /* - * Inner error containing list of errors. - */ - private Map additionalProperties; - - /** - * Creates an instance of InnerError class. - */ - public InnerError() { - } - - /** - * Get the code property: Specific error code than was provided by the containing error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: Specific error code than was provided by the containing error. - * - * @param code the code value to set. - * @return the InnerError object itself. - */ - InnerError withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the innerError property: Object containing more specific information than the current object about the error. - * - * @return the innerError value. - */ - public Object innerError() { - return this.innerError; - } - - /** - * Set the innerError property: Object containing more specific information than the current object about the error. - * - * @param innerError the innerError value to set. - * @return the InnerError object itself. - */ - InnerError withInnerError(Object innerError) { - this.innerError = innerError; - return this; - } - - /** - * Get the additionalProperties property: Inner error containing list of errors. - * - * @return the additionalProperties value. - */ - public Map additionalProperties() { - return this.additionalProperties; - } - - /** - * Set the additionalProperties property: Inner error containing list of errors. - * - * @param additionalProperties the additionalProperties value to set. - * @return the InnerError object itself. - */ - public InnerError withAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - if (additionalProperties != null) { - for (Map.Entry additionalProperty : additionalProperties.entrySet()) { - jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); - } - } - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InnerError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InnerError 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 InnerError. - */ - public static InnerError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InnerError deserializedInnerError = new InnerError(); - Map additionalProperties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedInnerError.code = reader.getString(); - } else if ("innerError".equals(fieldName)) { - deserializedInnerError.innerError = reader.readUntyped(); - } else { - if (additionalProperties == null) { - additionalProperties = new LinkedHashMap<>(); - } - - additionalProperties.put(fieldName, reader.readUntyped()); - } - } - deserializedInnerError.additionalProperties = additionalProperties; - - return deserializedInnerError; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Intent.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Intent.java new file mode 100644 index 000000000000..77db7e4c43f3 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Intent.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The intent. + */ +public final class Intent extends ExpandableStringEnum { + /** + * Static value NOT_SPECIFIED for Intent. + */ + public static final Intent NOT_SPECIFIED = fromString("NOT_SPECIFIED"); + + /** + * Static value LOW_PRIVILEGE for Intent. + */ + public static final Intent LOW_PRIVILEGE = fromString("LOW_PRIVILEGE"); + + /** + * Static value DEFERRED_ACCESS_CHECK for Intent. + */ + public static final Intent DEFERRED_ACCESS_CHECK = fromString("DEFERRED_ACCESS_CHECK"); + + /** + * Static value RP_CONTRACT for Intent. + */ + public static final Intent RP_CONTRACT = fromString("RP_CONTRACT"); + + /** + * Creates a new instance of Intent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Intent() { + } + + /** + * Creates or finds a Intent from its string representation. + * + * @param name a name to look for. + * @return the corresponding Intent. + */ + public static Intent fromString(String name) { + return fromString(name, Intent.class); + } + + /** + * Gets known Intent values. + * + * @return known Intent values. + */ + public static Collection values() { + return values(Intent.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyDisallowedCondition.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyDisallowedCondition.java new file mode 100644 index 000000000000..58fbdda94e89 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyDisallowedCondition.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The LegacyDisallowedCondition model. + */ +@Fluent +public final class LegacyDisallowedCondition implements JsonSerializable { + /* + * The disallowed legacy operations. + */ + private List disallowedLegacyOperations; + + /* + * Feature string. + */ + private String feature; + + /** + * Creates an instance of LegacyDisallowedCondition class. + */ + public LegacyDisallowedCondition() { + } + + /** + * Get the disallowedLegacyOperations property: The disallowed legacy operations. + * + * @return the disallowedLegacyOperations value. + */ + public List disallowedLegacyOperations() { + return this.disallowedLegacyOperations; + } + + /** + * Set the disallowedLegacyOperations property: The disallowed legacy operations. + * + * @param disallowedLegacyOperations the disallowedLegacyOperations value to set. + * @return the LegacyDisallowedCondition object itself. + */ + public LegacyDisallowedCondition withDisallowedLegacyOperations(List disallowedLegacyOperations) { + this.disallowedLegacyOperations = disallowedLegacyOperations; + return this; + } + + /** + * Get the feature property: Feature string. + * + * @return the feature value. + */ + public String feature() { + return this.feature; + } + + /** + * Set the feature property: Feature string. + * + * @param feature the feature value to set. + * @return the LegacyDisallowedCondition object itself. + */ + public LegacyDisallowedCondition withFeature(String feature) { + this.feature = feature; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("disallowedLegacyOperations", this.disallowedLegacyOperations, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("feature", this.feature); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LegacyDisallowedCondition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LegacyDisallowedCondition 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 LegacyDisallowedCondition. + */ + public static LegacyDisallowedCondition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LegacyDisallowedCondition deserializedLegacyDisallowedCondition = new LegacyDisallowedCondition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disallowedLegacyOperations".equals(fieldName)) { + List disallowedLegacyOperations + = reader.readArray(reader1 -> LegacyOperation.fromString(reader1.getString())); + deserializedLegacyDisallowedCondition.disallowedLegacyOperations = disallowedLegacyOperations; + } else if ("feature".equals(fieldName)) { + deserializedLegacyDisallowedCondition.feature = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLegacyDisallowedCondition; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyOperation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyOperation.java new file mode 100644 index 000000000000..dcfc258e9a33 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LegacyOperation.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for LegacyOperation. + */ +public final class LegacyOperation extends ExpandableStringEnum { + /** + * Static value NotSpecified for LegacyOperation. + */ + public static final LegacyOperation NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Create for LegacyOperation. + */ + public static final LegacyOperation CREATE = fromString("Create"); + + /** + * Static value Delete for LegacyOperation. + */ + public static final LegacyOperation DELETE = fromString("Delete"); + + /** + * Static value Waiting for LegacyOperation. + */ + public static final LegacyOperation WAITING = fromString("Waiting"); + + /** + * Static value AzureAsyncOperationWaiting for LegacyOperation. + */ + public static final LegacyOperation AZURE_ASYNC_OPERATION_WAITING = fromString("AzureAsyncOperationWaiting"); + + /** + * Static value ResourceCacheWaiting for LegacyOperation. + */ + public static final LegacyOperation RESOURCE_CACHE_WAITING = fromString("ResourceCacheWaiting"); + + /** + * Static value Action for LegacyOperation. + */ + public static final LegacyOperation ACTION = fromString("Action"); + + /** + * Static value Read for LegacyOperation. + */ + public static final LegacyOperation READ = fromString("Read"); + + /** + * Static value EvaluateDeploymentOutput for LegacyOperation. + */ + public static final LegacyOperation EVALUATE_DEPLOYMENT_OUTPUT = fromString("EvaluateDeploymentOutput"); + + /** + * Static value DeploymentCleanup for LegacyOperation. + */ + public static final LegacyOperation DEPLOYMENT_CLEANUP = fromString("DeploymentCleanup"); + + /** + * Creates a new instance of LegacyOperation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LegacyOperation() { + } + + /** + * Creates or finds a LegacyOperation from its string representation. + * + * @param name a name to look for. + * @return the corresponding LegacyOperation. + */ + public static LegacyOperation fromString(String name) { + return fromString(name, LegacyOperation.class); + } + + /** + * Gets known LegacyOperation values. + * + * @return known LegacyOperation values. + */ + public static Collection values() { + return values(LegacyOperation.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LightHouseAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LightHouseAuthorization.java index 42d8cd32c762..c1cda960489d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LightHouseAuthorization.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LightHouseAuthorization.java @@ -18,12 +18,12 @@ @Fluent public final class LightHouseAuthorization implements JsonSerializable { /* - * The principalId property. + * The principal id. */ private String principalId; /* - * The roleDefinitionId property. + * The role definition id. */ private String roleDefinitionId; @@ -34,7 +34,7 @@ public LightHouseAuthorization() { } /** - * Get the principalId property: The principalId property. + * Get the principalId property: The principal id. * * @return the principalId value. */ @@ -43,7 +43,7 @@ public String principalId() { } /** - * Set the principalId property: The principalId property. + * Set the principalId property: The principal id. * * @param principalId the principalId value to set. * @return the LightHouseAuthorization object itself. @@ -54,7 +54,7 @@ public LightHouseAuthorization withPrincipalId(String principalId) { } /** - * Get the roleDefinitionId property: The roleDefinitionId property. + * Get the roleDefinitionId property: The role definition id. * * @return the roleDefinitionId value. */ @@ -63,7 +63,7 @@ public String roleDefinitionId() { } /** - * Set the roleDefinitionId property: The roleDefinitionId property. + * Set the roleDefinitionId property: The role definition id. * * @param roleDefinitionId the roleDefinitionId value to set. * @return the LightHouseAuthorization object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAccessCheck.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAccessCheck.java index 85ed95d95b1d..90c59c87bf10 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAccessCheck.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAccessCheck.java @@ -17,27 +17,27 @@ @Fluent public final class LinkedAccessCheck implements JsonSerializable { /* - * The actionName property. + * The action name. */ private String actionName; /* - * The linkedProperty property. + * The linked property. */ private String linkedProperty; /* - * The linkedAction property. + * The linked action. */ private String linkedAction; /* - * The linkedActionVerb property. + * The linked action verb. */ private String linkedActionVerb; /* - * The linkedType property. + * The linked type. */ private String linkedType; @@ -48,7 +48,7 @@ public LinkedAccessCheck() { } /** - * Get the actionName property: The actionName property. + * Get the actionName property: The action name. * * @return the actionName value. */ @@ -57,7 +57,7 @@ public String actionName() { } /** - * Set the actionName property: The actionName property. + * Set the actionName property: The action name. * * @param actionName the actionName value to set. * @return the LinkedAccessCheck object itself. @@ -68,7 +68,7 @@ public LinkedAccessCheck withActionName(String actionName) { } /** - * Get the linkedProperty property: The linkedProperty property. + * Get the linkedProperty property: The linked property. * * @return the linkedProperty value. */ @@ -77,7 +77,7 @@ public String linkedProperty() { } /** - * Set the linkedProperty property: The linkedProperty property. + * Set the linkedProperty property: The linked property. * * @param linkedProperty the linkedProperty value to set. * @return the LinkedAccessCheck object itself. @@ -88,7 +88,7 @@ public LinkedAccessCheck withLinkedProperty(String linkedProperty) { } /** - * Get the linkedAction property: The linkedAction property. + * Get the linkedAction property: The linked action. * * @return the linkedAction value. */ @@ -97,7 +97,7 @@ public String linkedAction() { } /** - * Set the linkedAction property: The linkedAction property. + * Set the linkedAction property: The linked action. * * @param linkedAction the linkedAction value to set. * @return the LinkedAccessCheck object itself. @@ -108,7 +108,7 @@ public LinkedAccessCheck withLinkedAction(String linkedAction) { } /** - * Get the linkedActionVerb property: The linkedActionVerb property. + * Get the linkedActionVerb property: The linked action verb. * * @return the linkedActionVerb value. */ @@ -117,7 +117,7 @@ public String linkedActionVerb() { } /** - * Set the linkedActionVerb property: The linkedActionVerb property. + * Set the linkedActionVerb property: The linked action verb. * * @param linkedActionVerb the linkedActionVerb value to set. * @return the LinkedAccessCheck object itself. @@ -128,7 +128,7 @@ public LinkedAccessCheck withLinkedActionVerb(String linkedActionVerb) { } /** - * Get the linkedType property: The linkedType property. + * Get the linkedType property: The linked type. * * @return the linkedType value. */ @@ -137,7 +137,7 @@ public String linkedType() { } /** - * Set the linkedType property: The linkedType property. + * Set the linkedType property: The linked type. * * @param linkedType the linkedType value to set. * @return the LinkedAccessCheck object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAction.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAction.java index ea0f245e2046..0e6aed94c5a6 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAction.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedAction.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for LinkedAction. + * The linked action. */ public final class LinkedAction extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedNotificationRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedNotificationRule.java new file mode 100644 index 000000000000..3db7a9c251ab --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedNotificationRule.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +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.Duration; +import java.util.List; + +/** + * The LinkedNotificationRule model. + */ +@Fluent +public final class LinkedNotificationRule implements JsonSerializable { + /* + * The actions. + */ + private List actions; + + /* + * The actions on failed operation. + */ + private List actionsOnFailedOperation; + + /* + * The fast path actions. + */ + private List fastPathActions; + + /* + * The fast path action on failed operation. + */ + private List fastPathActionsOnFailedOperation; + + /* + * This is a TimeSpan property. + */ + private Duration linkedNotificationTimeout; + + /** + * Creates an instance of LinkedNotificationRule class. + */ + public LinkedNotificationRule() { + } + + /** + * Get the actions property: The actions. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: The actions. + * + * @param actions the actions value to set. + * @return the LinkedNotificationRule object itself. + */ + public LinkedNotificationRule withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the actionsOnFailedOperation property: The actions on failed operation. + * + * @return the actionsOnFailedOperation value. + */ + public List actionsOnFailedOperation() { + return this.actionsOnFailedOperation; + } + + /** + * Set the actionsOnFailedOperation property: The actions on failed operation. + * + * @param actionsOnFailedOperation the actionsOnFailedOperation value to set. + * @return the LinkedNotificationRule object itself. + */ + public LinkedNotificationRule withActionsOnFailedOperation(List actionsOnFailedOperation) { + this.actionsOnFailedOperation = actionsOnFailedOperation; + return this; + } + + /** + * Get the fastPathActions property: The fast path actions. + * + * @return the fastPathActions value. + */ + public List fastPathActions() { + return this.fastPathActions; + } + + /** + * Set the fastPathActions property: The fast path actions. + * + * @param fastPathActions the fastPathActions value to set. + * @return the LinkedNotificationRule object itself. + */ + public LinkedNotificationRule withFastPathActions(List fastPathActions) { + this.fastPathActions = fastPathActions; + return this; + } + + /** + * Get the fastPathActionsOnFailedOperation property: The fast path action on failed operation. + * + * @return the fastPathActionsOnFailedOperation value. + */ + public List fastPathActionsOnFailedOperation() { + return this.fastPathActionsOnFailedOperation; + } + + /** + * Set the fastPathActionsOnFailedOperation property: The fast path action on failed operation. + * + * @param fastPathActionsOnFailedOperation the fastPathActionsOnFailedOperation value to set. + * @return the LinkedNotificationRule object itself. + */ + public LinkedNotificationRule withFastPathActionsOnFailedOperation(List fastPathActionsOnFailedOperation) { + this.fastPathActionsOnFailedOperation = fastPathActionsOnFailedOperation; + return this; + } + + /** + * Get the linkedNotificationTimeout property: This is a TimeSpan property. + * + * @return the linkedNotificationTimeout value. + */ + public Duration linkedNotificationTimeout() { + return this.linkedNotificationTimeout; + } + + /** + * Set the linkedNotificationTimeout property: This is a TimeSpan property. + * + * @param linkedNotificationTimeout the linkedNotificationTimeout value to set. + * @return the LinkedNotificationRule object itself. + */ + public LinkedNotificationRule withLinkedNotificationTimeout(Duration linkedNotificationTimeout) { + this.linkedNotificationTimeout = linkedNotificationTimeout; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("actionsOnFailedOperation", this.actionsOnFailedOperation, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("fastPathActions", this.fastPathActions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("fastPathActionsOnFailedOperation", this.fastPathActionsOnFailedOperation, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("linkedNotificationTimeout", + CoreUtils.durationToStringWithDays(this.linkedNotificationTimeout)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinkedNotificationRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinkedNotificationRule 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 LinkedNotificationRule. + */ + public static LinkedNotificationRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinkedNotificationRule deserializedLinkedNotificationRule = new LinkedNotificationRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> reader1.getString()); + deserializedLinkedNotificationRule.actions = actions; + } else if ("actionsOnFailedOperation".equals(fieldName)) { + List actionsOnFailedOperation = reader.readArray(reader1 -> reader1.getString()); + deserializedLinkedNotificationRule.actionsOnFailedOperation = actionsOnFailedOperation; + } else if ("fastPathActions".equals(fieldName)) { + List fastPathActions = reader.readArray(reader1 -> reader1.getString()); + deserializedLinkedNotificationRule.fastPathActions = fastPathActions; + } else if ("fastPathActionsOnFailedOperation".equals(fieldName)) { + List fastPathActionsOnFailedOperation = reader.readArray(reader1 -> reader1.getString()); + deserializedLinkedNotificationRule.fastPathActionsOnFailedOperation + = fastPathActionsOnFailedOperation; + } else if ("linkedNotificationTimeout".equals(fieldName)) { + deserializedLinkedNotificationRule.linkedNotificationTimeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedLinkedNotificationRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperation.java index fac91e489afd..6d12ee6c0e1c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperation.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for LinkedOperation. + * The linked operation. */ public final class LinkedOperation extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperationRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperationRule.java index 8757c2a2e2c7..784ccd51e1d3 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperationRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LinkedOperationRule.java @@ -11,6 +11,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * The LinkedOperationRule model. @@ -18,15 +19,20 @@ @Fluent public final class LinkedOperationRule implements JsonSerializable { /* - * The linkedOperation property. + * The linked operation. */ private LinkedOperation linkedOperation; /* - * The linkedAction property. + * The linked action. */ private LinkedAction linkedAction; + /* + * Depends on types. + */ + private List dependsOnTypes; + /** * Creates an instance of LinkedOperationRule class. */ @@ -34,7 +40,7 @@ public LinkedOperationRule() { } /** - * Get the linkedOperation property: The linkedOperation property. + * Get the linkedOperation property: The linked operation. * * @return the linkedOperation value. */ @@ -43,7 +49,7 @@ public LinkedOperation linkedOperation() { } /** - * Set the linkedOperation property: The linkedOperation property. + * Set the linkedOperation property: The linked operation. * * @param linkedOperation the linkedOperation value to set. * @return the LinkedOperationRule object itself. @@ -54,7 +60,7 @@ public LinkedOperationRule withLinkedOperation(LinkedOperation linkedOperation) } /** - * Get the linkedAction property: The linkedAction property. + * Get the linkedAction property: The linked action. * * @return the linkedAction value. */ @@ -63,7 +69,7 @@ public LinkedAction linkedAction() { } /** - * Set the linkedAction property: The linkedAction property. + * Set the linkedAction property: The linked action. * * @param linkedAction the linkedAction value to set. * @return the LinkedOperationRule object itself. @@ -73,6 +79,26 @@ public LinkedOperationRule withLinkedAction(LinkedAction linkedAction) { return this; } + /** + * Get the dependsOnTypes property: Depends on types. + * + * @return the dependsOnTypes value. + */ + public List dependsOnTypes() { + return this.dependsOnTypes; + } + + /** + * Set the dependsOnTypes property: Depends on types. + * + * @param dependsOnTypes the dependsOnTypes value to set. + * @return the LinkedOperationRule object itself. + */ + public LinkedOperationRule withDependsOnTypes(List dependsOnTypes) { + this.dependsOnTypes = dependsOnTypes; + return this; + } + /** * Validates the instance. * @@ -102,6 +128,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("linkedOperation", this.linkedOperation == null ? null : this.linkedOperation.toString()); jsonWriter.writeStringField("linkedAction", this.linkedAction == null ? null : this.linkedAction.toString()); + jsonWriter.writeArrayField("dependsOnTypes", this.dependsOnTypes, + (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -125,6 +153,9 @@ public static LinkedOperationRule fromJson(JsonReader jsonReader) throws IOExcep deserializedLinkedOperationRule.linkedOperation = LinkedOperation.fromString(reader.getString()); } else if ("linkedAction".equals(fieldName)) { deserializedLinkedOperationRule.linkedAction = LinkedAction.fromString(reader.getString()); + } else if ("dependsOnTypes".equals(fieldName)) { + List dependsOnTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedLinkedOperationRule.dependsOnTypes = dependsOnTypes; } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinition.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinition.java new file mode 100644 index 000000000000..ea1d934da856 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinition.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LocalizedOperationDefinition model. + */ +@Fluent +public final class LocalizedOperationDefinition implements JsonSerializable { + /* + * Name of the operation. + */ + private String name; + + /* + * Indicates whether the operation applies to data-plane. + */ + private Boolean isDataAction; + + /* + * The origin. + */ + private OperationOrigins origin; + + /* + * Display information of the operation. + */ + private LocalizedOperationDefinitionDisplay display; + + /* + * The action type. + */ + private OperationActionType actionType; + + /** + * Creates an instance of LocalizedOperationDefinition class. + */ + public LocalizedOperationDefinition() { + } + + /** + * Get the name property: Name of the operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the operation. + * + * @param name the name value to set. + * @return the LocalizedOperationDefinition object itself. + */ + public LocalizedOperationDefinition withName(String name) { + this.name = name; + return this; + } + + /** + * Get the isDataAction property: Indicates whether the operation applies to data-plane. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set the isDataAction property: Indicates whether the operation applies to data-plane. + * + * @param isDataAction the isDataAction value to set. + * @return the LocalizedOperationDefinition object itself. + */ + public LocalizedOperationDefinition withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + + /** + * Get the origin property: The origin. + * + * @return the origin value. + */ + public OperationOrigins origin() { + return this.origin; + } + + /** + * Set the origin property: The origin. + * + * @param origin the origin value to set. + * @return the LocalizedOperationDefinition object itself. + */ + public LocalizedOperationDefinition withOrigin(OperationOrigins origin) { + this.origin = origin; + return this; + } + + /** + * Get the display property: Display information of the operation. + * + * @return the display value. + */ + public LocalizedOperationDefinitionDisplay display() { + return this.display; + } + + /** + * Set the display property: Display information of the operation. + * + * @param display the display value to set. + * @return the LocalizedOperationDefinition object itself. + */ + public LocalizedOperationDefinition withDisplay(LocalizedOperationDefinitionDisplay display) { + this.display = display; + return this; + } + + /** + * Get the actionType property: The action type. + * + * @return the actionType value. + */ + public OperationActionType actionType() { + return this.actionType; + } + + /** + * Set the actionType property: The action type. + * + * @param actionType the actionType value to set. + * @return the LocalizedOperationDefinition object itself. + */ + public LocalizedOperationDefinition withActionType(OperationActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model LocalizedOperationDefinition")); + } + if (display() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property display in model LocalizedOperationDefinition")); + } else { + display().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeBooleanField("isDataAction", this.isDataAction); + jsonWriter.writeStringField("origin", this.origin == null ? null : this.origin.toString()); + jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDefinition 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 LocalizedOperationDefinition. + */ + public static LocalizedOperationDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDefinition deserializedLocalizedOperationDefinition = new LocalizedOperationDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLocalizedOperationDefinition.name = reader.getString(); + } else if ("display".equals(fieldName)) { + deserializedLocalizedOperationDefinition.display + = LocalizedOperationDefinitionDisplay.fromJson(reader); + } else if ("isDataAction".equals(fieldName)) { + deserializedLocalizedOperationDefinition.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("origin".equals(fieldName)) { + deserializedLocalizedOperationDefinition.origin = OperationOrigins.fromString(reader.getString()); + } else if ("actionType".equals(fieldName)) { + deserializedLocalizedOperationDefinition.actionType + = OperationActionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDefinition; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinitionDisplay.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinitionDisplay.java new file mode 100644 index 000000000000..431e381278df --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDefinitionDisplay.java @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation. + */ +@Fluent +public final class LocalizedOperationDefinitionDisplay extends LocalizedOperationDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDefinitionDisplay class. + */ + public LocalizedOperationDefinitionDisplay() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay + withDefaultProperty(LocalizedOperationDisplayDefinitionDefault defaultProperty) { + super.withDefaultProperty(defaultProperty); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withEn(LocalizedOperationDisplayDefinitionEn en) { + super.withEn(en); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withCs(LocalizedOperationDisplayDefinitionCs cs) { + super.withCs(cs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withDe(LocalizedOperationDisplayDefinitionDe de) { + super.withDe(de); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withEs(LocalizedOperationDisplayDefinitionEs es) { + super.withEs(es); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withFr(LocalizedOperationDisplayDefinitionFr fr) { + super.withFr(fr); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withHu(LocalizedOperationDisplayDefinitionHu hu) { + super.withHu(hu); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withIt(LocalizedOperationDisplayDefinitionIt it) { + super.withIt(it); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withJa(LocalizedOperationDisplayDefinitionJa ja) { + super.withJa(ja); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withKo(LocalizedOperationDisplayDefinitionKo ko) { + super.withKo(ko); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withNl(LocalizedOperationDisplayDefinitionNl nl) { + super.withNl(nl); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withPl(LocalizedOperationDisplayDefinitionPl pl) { + super.withPl(pl); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withPtBR(LocalizedOperationDisplayDefinitionPtBR ptBR) { + super.withPtBR(ptBR); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withPt(LocalizedOperationDisplayDefinitionPt pt) { + super.withPt(pt); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withRu(LocalizedOperationDisplayDefinitionRu ru) { + super.withRu(ru); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withSv(LocalizedOperationDisplayDefinitionSv sv) { + super.withSv(sv); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withZhHans(LocalizedOperationDisplayDefinitionZhHans zhHans) { + super.withZhHans(zhHans); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDefinitionDisplay withZhHant(LocalizedOperationDisplayDefinitionZhHant zhHant) { + super.withZhHant(zhHant); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (defaultProperty() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property defaultProperty in model LocalizedOperationDefinitionDisplay")); + } else { + defaultProperty().validate(); + } + if (en() != null) { + en().validate(); + } + if (cs() != null) { + cs().validate(); + } + if (de() != null) { + de().validate(); + } + if (es() != null) { + es().validate(); + } + if (fr() != null) { + fr().validate(); + } + if (hu() != null) { + hu().validate(); + } + if (it() != null) { + it().validate(); + } + if (ja() != null) { + ja().validate(); + } + if (ko() != null) { + ko().validate(); + } + if (nl() != null) { + nl().validate(); + } + if (pl() != null) { + pl().validate(); + } + if (ptBR() != null) { + ptBR().validate(); + } + if (pt() != null) { + pt().validate(); + } + if (ru() != null) { + ru().validate(); + } + if (sv() != null) { + sv().validate(); + } + if (zhHans() != null) { + zhHans().validate(); + } + if (zhHant() != null) { + zhHant().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDefinitionDisplay.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("default", defaultProperty()); + jsonWriter.writeJsonField("en", en()); + jsonWriter.writeJsonField("cs", cs()); + jsonWriter.writeJsonField("de", de()); + jsonWriter.writeJsonField("es", es()); + jsonWriter.writeJsonField("fr", fr()); + jsonWriter.writeJsonField("hu", hu()); + jsonWriter.writeJsonField("it", it()); + jsonWriter.writeJsonField("ja", ja()); + jsonWriter.writeJsonField("ko", ko()); + jsonWriter.writeJsonField("nl", nl()); + jsonWriter.writeJsonField("pl", pl()); + jsonWriter.writeJsonField("ptBR", ptBR()); + jsonWriter.writeJsonField("ptPT", pt()); + jsonWriter.writeJsonField("ru", ru()); + jsonWriter.writeJsonField("sv", sv()); + jsonWriter.writeJsonField("zhHans", zhHans()); + jsonWriter.writeJsonField("zhHant", zhHant()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDefinitionDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDefinitionDisplay 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 LocalizedOperationDefinitionDisplay. + */ + public static LocalizedOperationDefinitionDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDefinitionDisplay deserializedLocalizedOperationDefinitionDisplay + = new LocalizedOperationDefinitionDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("default".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withDefaultProperty(LocalizedOperationDisplayDefinitionDefault.fromJson(reader)); + } else if ("en".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withEn(LocalizedOperationDisplayDefinitionEn.fromJson(reader)); + } else if ("cs".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withCs(LocalizedOperationDisplayDefinitionCs.fromJson(reader)); + } else if ("de".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withDe(LocalizedOperationDisplayDefinitionDe.fromJson(reader)); + } else if ("es".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withEs(LocalizedOperationDisplayDefinitionEs.fromJson(reader)); + } else if ("fr".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withFr(LocalizedOperationDisplayDefinitionFr.fromJson(reader)); + } else if ("hu".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withHu(LocalizedOperationDisplayDefinitionHu.fromJson(reader)); + } else if ("it".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withIt(LocalizedOperationDisplayDefinitionIt.fromJson(reader)); + } else if ("ja".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withJa(LocalizedOperationDisplayDefinitionJa.fromJson(reader)); + } else if ("ko".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withKo(LocalizedOperationDisplayDefinitionKo.fromJson(reader)); + } else if ("nl".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withNl(LocalizedOperationDisplayDefinitionNl.fromJson(reader)); + } else if ("pl".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withPl(LocalizedOperationDisplayDefinitionPl.fromJson(reader)); + } else if ("ptBR".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withPtBR(LocalizedOperationDisplayDefinitionPtBR.fromJson(reader)); + } else if ("ptPT".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withPt(LocalizedOperationDisplayDefinitionPt.fromJson(reader)); + } else if ("ru".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withRu(LocalizedOperationDisplayDefinitionRu.fromJson(reader)); + } else if ("sv".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withSv(LocalizedOperationDisplayDefinitionSv.fromJson(reader)); + } else if ("zhHans".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withZhHans(LocalizedOperationDisplayDefinitionZhHans.fromJson(reader)); + } else if ("zhHant".equals(fieldName)) { + deserializedLocalizedOperationDefinitionDisplay + .withZhHant(LocalizedOperationDisplayDefinitionZhHant.fromJson(reader)); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDefinitionDisplay; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinition.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinition.java new file mode 100644 index 000000000000..e6220adfbaf3 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinition.java @@ -0,0 +1,651 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LocalizedOperationDisplayDefinition model. + */ +@Fluent +public class LocalizedOperationDisplayDefinition implements JsonSerializable { + /* + * Display information of the operation. + */ + private LocalizedOperationDisplayDefinitionDefault defaultProperty; + + /* + * Display information of the operation for en locale. + */ + private LocalizedOperationDisplayDefinitionEn en; + + /* + * Display information of the operation for cs locale. + */ + private LocalizedOperationDisplayDefinitionCs cs; + + /* + * Display information of the operation for de locale. + */ + private LocalizedOperationDisplayDefinitionDe de; + + /* + * Display information of the operation for es locale. + */ + private LocalizedOperationDisplayDefinitionEs es; + + /* + * Display information of the operation for fr locale. + */ + private LocalizedOperationDisplayDefinitionFr fr; + + /* + * Display information of the operation for hu locale. + */ + private LocalizedOperationDisplayDefinitionHu hu; + + /* + * Display information of the operation for it locale. + */ + private LocalizedOperationDisplayDefinitionIt it; + + /* + * Display information of the operation for ja locale. + */ + private LocalizedOperationDisplayDefinitionJa ja; + + /* + * Display information of the operation for ko locale. + */ + private LocalizedOperationDisplayDefinitionKo ko; + + /* + * Display information of the operation for nl locale. + */ + private LocalizedOperationDisplayDefinitionNl nl; + + /* + * Display information of the operation for pl locale. + */ + private LocalizedOperationDisplayDefinitionPl pl; + + /* + * Display information of the operation for pt-BR locale. + */ + private LocalizedOperationDisplayDefinitionPtBR ptBR; + + /* + * Display information of the operation for pt-PT locale. + */ + private LocalizedOperationDisplayDefinitionPt pt; + + /* + * Display information of the operation for ru locale. + */ + private LocalizedOperationDisplayDefinitionRu ru; + + /* + * Display information of the operation for sv locale. + */ + private LocalizedOperationDisplayDefinitionSv sv; + + /* + * Display information of the operation for zh-Hans locale. + */ + private LocalizedOperationDisplayDefinitionZhHans zhHans; + + /* + * Display information of the operation for zh-Hant locale. + */ + private LocalizedOperationDisplayDefinitionZhHant zhHant; + + /** + * Creates an instance of LocalizedOperationDisplayDefinition class. + */ + public LocalizedOperationDisplayDefinition() { + } + + /** + * Get the defaultProperty property: Display information of the operation. + * + * @return the defaultProperty value. + */ + public LocalizedOperationDisplayDefinitionDefault defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: Display information of the operation. + * + * @param defaultProperty the defaultProperty value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition + withDefaultProperty(LocalizedOperationDisplayDefinitionDefault defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the en property: Display information of the operation for en locale. + * + * @return the en value. + */ + public LocalizedOperationDisplayDefinitionEn en() { + return this.en; + } + + /** + * Set the en property: Display information of the operation for en locale. + * + * @param en the en value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withEn(LocalizedOperationDisplayDefinitionEn en) { + this.en = en; + return this; + } + + /** + * Get the cs property: Display information of the operation for cs locale. + * + * @return the cs value. + */ + public LocalizedOperationDisplayDefinitionCs cs() { + return this.cs; + } + + /** + * Set the cs property: Display information of the operation for cs locale. + * + * @param cs the cs value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withCs(LocalizedOperationDisplayDefinitionCs cs) { + this.cs = cs; + return this; + } + + /** + * Get the de property: Display information of the operation for de locale. + * + * @return the de value. + */ + public LocalizedOperationDisplayDefinitionDe de() { + return this.de; + } + + /** + * Set the de property: Display information of the operation for de locale. + * + * @param de the de value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withDe(LocalizedOperationDisplayDefinitionDe de) { + this.de = de; + return this; + } + + /** + * Get the es property: Display information of the operation for es locale. + * + * @return the es value. + */ + public LocalizedOperationDisplayDefinitionEs es() { + return this.es; + } + + /** + * Set the es property: Display information of the operation for es locale. + * + * @param es the es value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withEs(LocalizedOperationDisplayDefinitionEs es) { + this.es = es; + return this; + } + + /** + * Get the fr property: Display information of the operation for fr locale. + * + * @return the fr value. + */ + public LocalizedOperationDisplayDefinitionFr fr() { + return this.fr; + } + + /** + * Set the fr property: Display information of the operation for fr locale. + * + * @param fr the fr value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withFr(LocalizedOperationDisplayDefinitionFr fr) { + this.fr = fr; + return this; + } + + /** + * Get the hu property: Display information of the operation for hu locale. + * + * @return the hu value. + */ + public LocalizedOperationDisplayDefinitionHu hu() { + return this.hu; + } + + /** + * Set the hu property: Display information of the operation for hu locale. + * + * @param hu the hu value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withHu(LocalizedOperationDisplayDefinitionHu hu) { + this.hu = hu; + return this; + } + + /** + * Get the it property: Display information of the operation for it locale. + * + * @return the it value. + */ + public LocalizedOperationDisplayDefinitionIt it() { + return this.it; + } + + /** + * Set the it property: Display information of the operation for it locale. + * + * @param it the it value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withIt(LocalizedOperationDisplayDefinitionIt it) { + this.it = it; + return this; + } + + /** + * Get the ja property: Display information of the operation for ja locale. + * + * @return the ja value. + */ + public LocalizedOperationDisplayDefinitionJa ja() { + return this.ja; + } + + /** + * Set the ja property: Display information of the operation for ja locale. + * + * @param ja the ja value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withJa(LocalizedOperationDisplayDefinitionJa ja) { + this.ja = ja; + return this; + } + + /** + * Get the ko property: Display information of the operation for ko locale. + * + * @return the ko value. + */ + public LocalizedOperationDisplayDefinitionKo ko() { + return this.ko; + } + + /** + * Set the ko property: Display information of the operation for ko locale. + * + * @param ko the ko value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withKo(LocalizedOperationDisplayDefinitionKo ko) { + this.ko = ko; + return this; + } + + /** + * Get the nl property: Display information of the operation for nl locale. + * + * @return the nl value. + */ + public LocalizedOperationDisplayDefinitionNl nl() { + return this.nl; + } + + /** + * Set the nl property: Display information of the operation for nl locale. + * + * @param nl the nl value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withNl(LocalizedOperationDisplayDefinitionNl nl) { + this.nl = nl; + return this; + } + + /** + * Get the pl property: Display information of the operation for pl locale. + * + * @return the pl value. + */ + public LocalizedOperationDisplayDefinitionPl pl() { + return this.pl; + } + + /** + * Set the pl property: Display information of the operation for pl locale. + * + * @param pl the pl value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withPl(LocalizedOperationDisplayDefinitionPl pl) { + this.pl = pl; + return this; + } + + /** + * Get the ptBR property: Display information of the operation for pt-BR locale. + * + * @return the ptBR value. + */ + public LocalizedOperationDisplayDefinitionPtBR ptBR() { + return this.ptBR; + } + + /** + * Set the ptBR property: Display information of the operation for pt-BR locale. + * + * @param ptBR the ptBR value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withPtBR(LocalizedOperationDisplayDefinitionPtBR ptBR) { + this.ptBR = ptBR; + return this; + } + + /** + * Get the pt property: Display information of the operation for pt-PT locale. + * + * @return the pt value. + */ + public LocalizedOperationDisplayDefinitionPt pt() { + return this.pt; + } + + /** + * Set the pt property: Display information of the operation for pt-PT locale. + * + * @param pt the pt value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withPt(LocalizedOperationDisplayDefinitionPt pt) { + this.pt = pt; + return this; + } + + /** + * Get the ru property: Display information of the operation for ru locale. + * + * @return the ru value. + */ + public LocalizedOperationDisplayDefinitionRu ru() { + return this.ru; + } + + /** + * Set the ru property: Display information of the operation for ru locale. + * + * @param ru the ru value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withRu(LocalizedOperationDisplayDefinitionRu ru) { + this.ru = ru; + return this; + } + + /** + * Get the sv property: Display information of the operation for sv locale. + * + * @return the sv value. + */ + public LocalizedOperationDisplayDefinitionSv sv() { + return this.sv; + } + + /** + * Set the sv property: Display information of the operation for sv locale. + * + * @param sv the sv value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withSv(LocalizedOperationDisplayDefinitionSv sv) { + this.sv = sv; + return this; + } + + /** + * Get the zhHans property: Display information of the operation for zh-Hans locale. + * + * @return the zhHans value. + */ + public LocalizedOperationDisplayDefinitionZhHans zhHans() { + return this.zhHans; + } + + /** + * Set the zhHans property: Display information of the operation for zh-Hans locale. + * + * @param zhHans the zhHans value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withZhHans(LocalizedOperationDisplayDefinitionZhHans zhHans) { + this.zhHans = zhHans; + return this; + } + + /** + * Get the zhHant property: Display information of the operation for zh-Hant locale. + * + * @return the zhHant value. + */ + public LocalizedOperationDisplayDefinitionZhHant zhHant() { + return this.zhHant; + } + + /** + * Set the zhHant property: Display information of the operation for zh-Hant locale. + * + * @param zhHant the zhHant value to set. + * @return the LocalizedOperationDisplayDefinition object itself. + */ + public LocalizedOperationDisplayDefinition withZhHant(LocalizedOperationDisplayDefinitionZhHant zhHant) { + this.zhHant = zhHant; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (defaultProperty() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property defaultProperty in model LocalizedOperationDisplayDefinition")); + } else { + defaultProperty().validate(); + } + if (en() != null) { + en().validate(); + } + if (cs() != null) { + cs().validate(); + } + if (de() != null) { + de().validate(); + } + if (es() != null) { + es().validate(); + } + if (fr() != null) { + fr().validate(); + } + if (hu() != null) { + hu().validate(); + } + if (it() != null) { + it().validate(); + } + if (ja() != null) { + ja().validate(); + } + if (ko() != null) { + ko().validate(); + } + if (nl() != null) { + nl().validate(); + } + if (pl() != null) { + pl().validate(); + } + if (ptBR() != null) { + ptBR().validate(); + } + if (pt() != null) { + pt().validate(); + } + if (ru() != null) { + ru().validate(); + } + if (sv() != null) { + sv().validate(); + } + if (zhHans() != null) { + zhHans().validate(); + } + if (zhHant() != null) { + zhHant().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinition.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("default", this.defaultProperty); + jsonWriter.writeJsonField("en", this.en); + jsonWriter.writeJsonField("cs", this.cs); + jsonWriter.writeJsonField("de", this.de); + jsonWriter.writeJsonField("es", this.es); + jsonWriter.writeJsonField("fr", this.fr); + jsonWriter.writeJsonField("hu", this.hu); + jsonWriter.writeJsonField("it", this.it); + jsonWriter.writeJsonField("ja", this.ja); + jsonWriter.writeJsonField("ko", this.ko); + jsonWriter.writeJsonField("nl", this.nl); + jsonWriter.writeJsonField("pl", this.pl); + jsonWriter.writeJsonField("ptBR", this.ptBR); + jsonWriter.writeJsonField("ptPT", this.pt); + jsonWriter.writeJsonField("ru", this.ru); + jsonWriter.writeJsonField("sv", this.sv); + jsonWriter.writeJsonField("zhHans", this.zhHans); + jsonWriter.writeJsonField("zhHant", this.zhHant); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinition 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 LocalizedOperationDisplayDefinition. + */ + public static LocalizedOperationDisplayDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinition deserializedLocalizedOperationDisplayDefinition + = new LocalizedOperationDisplayDefinition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("default".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.defaultProperty + = LocalizedOperationDisplayDefinitionDefault.fromJson(reader); + } else if ("en".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.en + = LocalizedOperationDisplayDefinitionEn.fromJson(reader); + } else if ("cs".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.cs + = LocalizedOperationDisplayDefinitionCs.fromJson(reader); + } else if ("de".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.de + = LocalizedOperationDisplayDefinitionDe.fromJson(reader); + } else if ("es".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.es + = LocalizedOperationDisplayDefinitionEs.fromJson(reader); + } else if ("fr".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.fr + = LocalizedOperationDisplayDefinitionFr.fromJson(reader); + } else if ("hu".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.hu + = LocalizedOperationDisplayDefinitionHu.fromJson(reader); + } else if ("it".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.it + = LocalizedOperationDisplayDefinitionIt.fromJson(reader); + } else if ("ja".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.ja + = LocalizedOperationDisplayDefinitionJa.fromJson(reader); + } else if ("ko".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.ko + = LocalizedOperationDisplayDefinitionKo.fromJson(reader); + } else if ("nl".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.nl + = LocalizedOperationDisplayDefinitionNl.fromJson(reader); + } else if ("pl".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.pl + = LocalizedOperationDisplayDefinitionPl.fromJson(reader); + } else if ("ptBR".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.ptBR + = LocalizedOperationDisplayDefinitionPtBR.fromJson(reader); + } else if ("ptPT".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.pt + = LocalizedOperationDisplayDefinitionPt.fromJson(reader); + } else if ("ru".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.ru + = LocalizedOperationDisplayDefinitionRu.fromJson(reader); + } else if ("sv".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.sv + = LocalizedOperationDisplayDefinitionSv.fromJson(reader); + } else if ("zhHans".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.zhHans + = LocalizedOperationDisplayDefinitionZhHans.fromJson(reader); + } else if ("zhHant".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinition.zhHant + = LocalizedOperationDisplayDefinitionZhHant.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinition; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionCs.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionCs.java new file mode 100644 index 000000000000..f5bbb1c3c703 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionCs.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for cs locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionCs extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionCs class. + */ + public LocalizedOperationDisplayDefinitionCs() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionCs withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionCs withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionCs withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionCs withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionCs")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionCs")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionCs")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionCs")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionCs.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionCs from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionCs 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 LocalizedOperationDisplayDefinitionCs. + */ + public static LocalizedOperationDisplayDefinitionCs fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionCs deserializedLocalizedOperationDisplayDefinitionCs + = new LocalizedOperationDisplayDefinitionCs(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionCs.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionCs.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionCs.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionCs.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionCs; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDe.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDe.java new file mode 100644 index 000000000000..be47dee60d35 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDe.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for de locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionDe extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionDe class. + */ + public LocalizedOperationDisplayDefinitionDe() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDe withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDe withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDe withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDe withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionDe")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionDe")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionDe")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionDe")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionDe.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionDe from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionDe 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 LocalizedOperationDisplayDefinitionDe. + */ + public static LocalizedOperationDisplayDefinitionDe fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionDe deserializedLocalizedOperationDisplayDefinitionDe + = new LocalizedOperationDisplayDefinitionDe(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDe.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDe.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDe.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDe.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionDe; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDefault.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDefault.java new file mode 100644 index 000000000000..03cc9769f9ca --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionDefault.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionDefault extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionDefault class. + */ + public LocalizedOperationDisplayDefinitionDefault() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDefault withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDefault withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDefault withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionDefault withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionDefault")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionDefault")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionDefault")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionDefault")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionDefault.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionDefault from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionDefault 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 LocalizedOperationDisplayDefinitionDefault. + */ + public static LocalizedOperationDisplayDefinitionDefault fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionDefault deserializedLocalizedOperationDisplayDefinitionDefault + = new LocalizedOperationDisplayDefinitionDefault(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDefault.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDefault.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDefault.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionDefault.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionDefault; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEn.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEn.java new file mode 100644 index 000000000000..604454b6f69a --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEn.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for en locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionEn extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionEn class. + */ + public LocalizedOperationDisplayDefinitionEn() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEn withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEn withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEn withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEn withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionEn")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionEn")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionEn")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionEn")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionEn.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionEn from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionEn 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 LocalizedOperationDisplayDefinitionEn. + */ + public static LocalizedOperationDisplayDefinitionEn fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionEn deserializedLocalizedOperationDisplayDefinitionEn + = new LocalizedOperationDisplayDefinitionEn(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEn.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEn.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEn.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEn.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionEn; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEs.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEs.java new file mode 100644 index 000000000000..5f3bad9dcc41 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionEs.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for es locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionEs extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionEs class. + */ + public LocalizedOperationDisplayDefinitionEs() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEs withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEs withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEs withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionEs withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionEs")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionEs")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionEs")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionEs")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionEs.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionEs from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionEs 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 LocalizedOperationDisplayDefinitionEs. + */ + public static LocalizedOperationDisplayDefinitionEs fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionEs deserializedLocalizedOperationDisplayDefinitionEs + = new LocalizedOperationDisplayDefinitionEs(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEs.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEs.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEs.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionEs.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionEs; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionFr.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionFr.java new file mode 100644 index 000000000000..7d5154cfc5da --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionFr.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for fr locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionFr extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionFr class. + */ + public LocalizedOperationDisplayDefinitionFr() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionFr withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionFr withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionFr withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionFr withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionFr")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionFr")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionFr")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionFr")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionFr.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionFr from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionFr 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 LocalizedOperationDisplayDefinitionFr. + */ + public static LocalizedOperationDisplayDefinitionFr fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionFr deserializedLocalizedOperationDisplayDefinitionFr + = new LocalizedOperationDisplayDefinitionFr(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionFr.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionFr.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionFr.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionFr.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionFr; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionHu.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionHu.java new file mode 100644 index 000000000000..36eb416b10b5 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionHu.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for hu locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionHu extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionHu class. + */ + public LocalizedOperationDisplayDefinitionHu() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionHu withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionHu withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionHu withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionHu withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionHu")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionHu")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionHu")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionHu")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionHu.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionHu from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionHu 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 LocalizedOperationDisplayDefinitionHu. + */ + public static LocalizedOperationDisplayDefinitionHu fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionHu deserializedLocalizedOperationDisplayDefinitionHu + = new LocalizedOperationDisplayDefinitionHu(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionHu.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionHu.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionHu.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionHu.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionHu; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionIt.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionIt.java new file mode 100644 index 000000000000..c9a763e5c057 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionIt.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for it locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionIt extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionIt class. + */ + public LocalizedOperationDisplayDefinitionIt() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionIt withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionIt withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionIt withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionIt withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionIt")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionIt")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionIt")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionIt")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionIt.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionIt from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionIt 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 LocalizedOperationDisplayDefinitionIt. + */ + public static LocalizedOperationDisplayDefinitionIt fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionIt deserializedLocalizedOperationDisplayDefinitionIt + = new LocalizedOperationDisplayDefinitionIt(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionIt.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionIt.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionIt.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionIt.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionIt; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionJa.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionJa.java new file mode 100644 index 000000000000..3397da844ef2 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionJa.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for ja locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionJa extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionJa class. + */ + public LocalizedOperationDisplayDefinitionJa() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionJa withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionJa withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionJa withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionJa withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionJa")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionJa")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionJa")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionJa")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionJa.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionJa from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionJa 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 LocalizedOperationDisplayDefinitionJa. + */ + public static LocalizedOperationDisplayDefinitionJa fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionJa deserializedLocalizedOperationDisplayDefinitionJa + = new LocalizedOperationDisplayDefinitionJa(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionJa.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionJa.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionJa.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionJa.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionJa; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionKo.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionKo.java new file mode 100644 index 000000000000..fa873364989b --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionKo.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for ko locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionKo extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionKo class. + */ + public LocalizedOperationDisplayDefinitionKo() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionKo withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionKo withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionKo withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionKo withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionKo")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionKo")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionKo")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionKo")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionKo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionKo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionKo 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 LocalizedOperationDisplayDefinitionKo. + */ + public static LocalizedOperationDisplayDefinitionKo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionKo deserializedLocalizedOperationDisplayDefinitionKo + = new LocalizedOperationDisplayDefinitionKo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionKo.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionKo.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionKo.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionKo.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionKo; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionNl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionNl.java new file mode 100644 index 000000000000..9581280d360d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionNl.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for nl locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionNl extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionNl class. + */ + public LocalizedOperationDisplayDefinitionNl() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionNl withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionNl withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionNl withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionNl withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionNl")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionNl")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionNl")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionNl")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionNl.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionNl from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionNl 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 LocalizedOperationDisplayDefinitionNl. + */ + public static LocalizedOperationDisplayDefinitionNl fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionNl deserializedLocalizedOperationDisplayDefinitionNl + = new LocalizedOperationDisplayDefinitionNl(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionNl.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionNl.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionNl.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionNl.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionNl; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPl.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPl.java new file mode 100644 index 000000000000..c0ef46f1d655 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPl.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for pl locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionPl extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionPl class. + */ + public LocalizedOperationDisplayDefinitionPl() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPl withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPl withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPl withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPl withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionPl")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionPl")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionPl")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionPl")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionPl.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionPl from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionPl 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 LocalizedOperationDisplayDefinitionPl. + */ + public static LocalizedOperationDisplayDefinitionPl fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionPl deserializedLocalizedOperationDisplayDefinitionPl + = new LocalizedOperationDisplayDefinitionPl(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPl.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPl.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPl.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPl.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionPl; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPt.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPt.java new file mode 100644 index 000000000000..8a463b0315a4 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPt.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for pt-PT locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionPt extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionPt class. + */ + public LocalizedOperationDisplayDefinitionPt() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPt withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPt withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPt withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPt withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionPt")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionPt")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionPt")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionPt")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionPt.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionPt from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionPt 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 LocalizedOperationDisplayDefinitionPt. + */ + public static LocalizedOperationDisplayDefinitionPt fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionPt deserializedLocalizedOperationDisplayDefinitionPt + = new LocalizedOperationDisplayDefinitionPt(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPt.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPt.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPt.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPt.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionPt; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPtBR.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPtBR.java new file mode 100644 index 000000000000..62219df2bbae --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionPtBR.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for pt-BR locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionPtBR extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionPtBR class. + */ + public LocalizedOperationDisplayDefinitionPtBR() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPtBR withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPtBR withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPtBR withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionPtBR withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionPtBR")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionPtBR")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionPtBR")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionPtBR")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionPtBR.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionPtBR from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionPtBR 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 LocalizedOperationDisplayDefinitionPtBR. + */ + public static LocalizedOperationDisplayDefinitionPtBR fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionPtBR deserializedLocalizedOperationDisplayDefinitionPtBR + = new LocalizedOperationDisplayDefinitionPtBR(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPtBR.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPtBR.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPtBR.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionPtBR.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionPtBR; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionRu.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionRu.java new file mode 100644 index 000000000000..05a186b12369 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionRu.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for ru locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionRu extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionRu class. + */ + public LocalizedOperationDisplayDefinitionRu() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionRu withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionRu withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionRu withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionRu withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionRu")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionRu")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionRu")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionRu")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionRu.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionRu from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionRu 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 LocalizedOperationDisplayDefinitionRu. + */ + public static LocalizedOperationDisplayDefinitionRu fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionRu deserializedLocalizedOperationDisplayDefinitionRu + = new LocalizedOperationDisplayDefinitionRu(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionRu.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionRu.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionRu.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionRu.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionRu; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionSv.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionSv.java new file mode 100644 index 000000000000..9f4458acbfcf --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionSv.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for sv locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionSv extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionSv class. + */ + public LocalizedOperationDisplayDefinitionSv() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionSv withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionSv withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionSv withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionSv withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionSv")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionSv")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionSv")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionSv")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionSv.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionSv from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionSv 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 LocalizedOperationDisplayDefinitionSv. + */ + public static LocalizedOperationDisplayDefinitionSv fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionSv deserializedLocalizedOperationDisplayDefinitionSv + = new LocalizedOperationDisplayDefinitionSv(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionSv.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionSv.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionSv.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionSv.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionSv; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHans.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHans.java new file mode 100644 index 000000000000..101968838197 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHans.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for zh-Hans locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionZhHans extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionZhHans class. + */ + public LocalizedOperationDisplayDefinitionZhHans() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHans withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHans withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHans withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHans withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionZhHans")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionZhHans")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionZhHans")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionZhHans")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionZhHans.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionZhHans from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionZhHans 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 LocalizedOperationDisplayDefinitionZhHans. + */ + public static LocalizedOperationDisplayDefinitionZhHans fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionZhHans deserializedLocalizedOperationDisplayDefinitionZhHans + = new LocalizedOperationDisplayDefinitionZhHans(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHans.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHans.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHans.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHans.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionZhHans; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHant.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHant.java new file mode 100644 index 000000000000..4bdc518bd003 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocalizedOperationDisplayDefinitionZhHant.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Display information of the operation for zh-Hant locale. + */ +@Fluent +public final class LocalizedOperationDisplayDefinitionZhHant extends OperationsDisplayDefinition { + /** + * Creates an instance of LocalizedOperationDisplayDefinitionZhHant class. + */ + public LocalizedOperationDisplayDefinitionZhHant() { + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHant withProvider(String provider) { + super.withProvider(provider); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHant withResource(String resource) { + super.withResource(resource); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHant withOperation(String operation) { + super.withOperation(operation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LocalizedOperationDisplayDefinitionZhHant withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (provider() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property provider in model LocalizedOperationDisplayDefinitionZhHant")); + } + if (resource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resource in model LocalizedOperationDisplayDefinitionZhHant")); + } + if (operation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property operation in model LocalizedOperationDisplayDefinitionZhHant")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model LocalizedOperationDisplayDefinitionZhHant")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocalizedOperationDisplayDefinitionZhHant.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", provider()); + jsonWriter.writeStringField("resource", resource()); + jsonWriter.writeStringField("operation", operation()); + jsonWriter.writeStringField("description", description()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocalizedOperationDisplayDefinitionZhHant from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocalizedOperationDisplayDefinitionZhHant 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 LocalizedOperationDisplayDefinitionZhHant. + */ + public static LocalizedOperationDisplayDefinitionZhHant fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocalizedOperationDisplayDefinitionZhHant deserializedLocalizedOperationDisplayDefinitionZhHant + = new LocalizedOperationDisplayDefinitionZhHant(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHant.withProvider(reader.getString()); + } else if ("resource".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHant.withResource(reader.getString()); + } else if ("operation".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHant.withOperation(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedLocalizedOperationDisplayDefinitionZhHant.withDescription(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedLocalizedOperationDisplayDefinitionZhHant; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocationQuotaRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocationQuotaRule.java new file mode 100644 index 000000000000..a1038c8af54d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LocationQuotaRule.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LocationQuotaRule model. + */ +@Fluent +public final class LocationQuotaRule implements JsonSerializable { + /* + * The policy. + */ + private QuotaPolicy policy; + + /* + * The quota id. + */ + private String quotaId; + + /* + * The location. + */ + private String location; + + /** + * Creates an instance of LocationQuotaRule class. + */ + public LocationQuotaRule() { + } + + /** + * Get the policy property: The policy. + * + * @return the policy value. + */ + public QuotaPolicy policy() { + return this.policy; + } + + /** + * Set the policy property: The policy. + * + * @param policy the policy value to set. + * @return the LocationQuotaRule object itself. + */ + public LocationQuotaRule withPolicy(QuotaPolicy policy) { + this.policy = policy; + return this; + } + + /** + * Get the quotaId property: The quota id. + * + * @return the quotaId value. + */ + public String quotaId() { + return this.quotaId; + } + + /** + * Set the quotaId property: The quota id. + * + * @param quotaId the quotaId value to set. + * @return the LocationQuotaRule object itself. + */ + public LocationQuotaRule withQuotaId(String quotaId) { + this.quotaId = quotaId; + return this; + } + + /** + * Get the location property: The location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location. + * + * @param location the location value to set. + * @return the LocationQuotaRule object itself. + */ + public LocationQuotaRule withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("policy", this.policy == null ? null : this.policy.toString()); + jsonWriter.writeStringField("quotaId", this.quotaId); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LocationQuotaRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LocationQuotaRule 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 LocationQuotaRule. + */ + public static LocationQuotaRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LocationQuotaRule deserializedLocationQuotaRule = new LocationQuotaRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policy".equals(fieldName)) { + deserializedLocationQuotaRule.policy = QuotaPolicy.fromString(reader.getString()); + } else if ("quotaId".equals(fieldName)) { + deserializedLocationQuotaRule.quotaId = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedLocationQuotaRule.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLocationQuotaRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDetails.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDetails.java index 35615ab90b54..6a535fafd896 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDetails.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDetails.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for LoggingDetails. + * The detail level. */ public final class LoggingDetails extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDirections.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDirections.java index 1b13c2fa9bfc..5989331c8f62 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDirections.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingDirections.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for LoggingDirections. + * The direction. */ public final class LoggingDirections extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingHiddenPropertyPath.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingHiddenPropertyPath.java index 783ddf76c04b..1e94f9cc5851 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingHiddenPropertyPath.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingHiddenPropertyPath.java @@ -18,12 +18,12 @@ @Fluent public class LoggingHiddenPropertyPath implements JsonSerializable { /* - * The hiddenPathsOnRequest property. + * The hidden paths on request. */ private List hiddenPathsOnRequest; /* - * The hiddenPathsOnResponse property. + * The hidden paths on response. */ private List hiddenPathsOnResponse; @@ -34,7 +34,7 @@ public LoggingHiddenPropertyPath() { } /** - * Get the hiddenPathsOnRequest property: The hiddenPathsOnRequest property. + * Get the hiddenPathsOnRequest property: The hidden paths on request. * * @return the hiddenPathsOnRequest value. */ @@ -43,7 +43,7 @@ public List hiddenPathsOnRequest() { } /** - * Set the hiddenPathsOnRequest property: The hiddenPathsOnRequest property. + * Set the hiddenPathsOnRequest property: The hidden paths on request. * * @param hiddenPathsOnRequest the hiddenPathsOnRequest value to set. * @return the LoggingHiddenPropertyPath object itself. @@ -54,7 +54,7 @@ public LoggingHiddenPropertyPath withHiddenPathsOnRequest(List hiddenPat } /** - * Get the hiddenPathsOnResponse property: The hiddenPathsOnResponse property. + * Get the hiddenPathsOnResponse property: The hidden paths on response. * * @return the hiddenPathsOnResponse value. */ @@ -63,7 +63,7 @@ public List hiddenPathsOnResponse() { } /** - * Set the hiddenPathsOnResponse property: The hiddenPathsOnResponse property. + * Set the hiddenPathsOnResponse property: The hidden paths on response. * * @param hiddenPathsOnResponse the hiddenPathsOnResponse value to set. * @return the LoggingHiddenPropertyPath object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRule.java index 684c526a36f4..2220e1573776 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRule.java @@ -18,22 +18,22 @@ @Fluent public final class LoggingRule implements JsonSerializable { /* - * The action property. + * The action. */ private String action; /* - * The direction property. + * The direction. */ private LoggingDirections direction; /* - * The detailLevel property. + * The detail level. */ private LoggingDetails detailLevel; /* - * The hiddenPropertyPaths property. + * The hidden property paths. */ private LoggingRuleHiddenPropertyPaths hiddenPropertyPaths; @@ -44,7 +44,7 @@ public LoggingRule() { } /** - * Get the action property: The action property. + * Get the action property: The action. * * @return the action value. */ @@ -53,7 +53,7 @@ public String action() { } /** - * Set the action property: The action property. + * Set the action property: The action. * * @param action the action value to set. * @return the LoggingRule object itself. @@ -64,7 +64,7 @@ public LoggingRule withAction(String action) { } /** - * Get the direction property: The direction property. + * Get the direction property: The direction. * * @return the direction value. */ @@ -73,7 +73,7 @@ public LoggingDirections direction() { } /** - * Set the direction property: The direction property. + * Set the direction property: The direction. * * @param direction the direction value to set. * @return the LoggingRule object itself. @@ -84,7 +84,7 @@ public LoggingRule withDirection(LoggingDirections direction) { } /** - * Get the detailLevel property: The detailLevel property. + * Get the detailLevel property: The detail level. * * @return the detailLevel value. */ @@ -93,7 +93,7 @@ public LoggingDetails detailLevel() { } /** - * Set the detailLevel property: The detailLevel property. + * Set the detailLevel property: The detail level. * * @param detailLevel the detailLevel value to set. * @return the LoggingRule object itself. @@ -104,7 +104,7 @@ public LoggingRule withDetailLevel(LoggingDetails detailLevel) { } /** - * Get the hiddenPropertyPaths property: The hiddenPropertyPaths property. + * Get the hiddenPropertyPaths property: The hidden property paths. * * @return the hiddenPropertyPaths value. */ @@ -113,7 +113,7 @@ public LoggingRuleHiddenPropertyPaths hiddenPropertyPaths() { } /** - * Set the hiddenPropertyPaths property: The hiddenPropertyPaths property. + * Set the hiddenPropertyPaths property: The hidden property paths. * * @param hiddenPropertyPaths the hiddenPropertyPaths value to set. * @return the LoggingRule object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRuleHiddenPropertyPaths.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRuleHiddenPropertyPaths.java index 223c57abb84a..90bf3ac4ea2b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRuleHiddenPropertyPaths.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/LoggingRuleHiddenPropertyPaths.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The LoggingRuleHiddenPropertyPaths model. + * The hidden property paths. */ @Fluent public final class LoggingRuleHiddenPropertyPaths extends LoggingHiddenPropertyPath { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestLevelPropertyBag.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestLevelPropertyBag.java new file mode 100644 index 000000000000..206c9b028e8a --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestLevelPropertyBag.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ManifestLevelPropertyBag model. + */ +@Fluent +public class ManifestLevelPropertyBag implements JsonSerializable { + /* + * The resource hydration accounts. + */ + private List resourceHydrationAccounts; + + /** + * Creates an instance of ManifestLevelPropertyBag class. + */ + public ManifestLevelPropertyBag() { + } + + /** + * Get the resourceHydrationAccounts property: The resource hydration accounts. + * + * @return the resourceHydrationAccounts value. + */ + public List resourceHydrationAccounts() { + return this.resourceHydrationAccounts; + } + + /** + * Set the resourceHydrationAccounts property: The resource hydration accounts. + * + * @param resourceHydrationAccounts the resourceHydrationAccounts value to set. + * @return the ManifestLevelPropertyBag object itself. + */ + public ManifestLevelPropertyBag + withResourceHydrationAccounts(List resourceHydrationAccounts) { + this.resourceHydrationAccounts = resourceHydrationAccounts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceHydrationAccounts() != null) { + resourceHydrationAccounts().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resourceHydrationAccounts", this.resourceHydrationAccounts, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManifestLevelPropertyBag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManifestLevelPropertyBag 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 ManifestLevelPropertyBag. + */ + public static ManifestLevelPropertyBag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManifestLevelPropertyBag deserializedManifestLevelPropertyBag = new ManifestLevelPropertyBag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceHydrationAccounts".equals(fieldName)) { + List resourceHydrationAccounts + = reader.readArray(reader1 -> ResourceHydrationAccount.fromJson(reader1)); + deserializedManifestLevelPropertyBag.resourceHydrationAccounts = resourceHydrationAccounts; + } else { + reader.skipChildren(); + } + } + + return deserializedManifestLevelPropertyBag; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestResourceDeletionPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestResourceDeletionPolicy.java index 45b2f62a5bc5..713f9fcc607a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestResourceDeletionPolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ManifestResourceDeletionPolicy.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ManifestResourceDeletionPolicy. + * The resource deletion policy. */ public final class ManifestResourceDeletionPolicy extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MarketplaceType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MarketplaceType.java index 3670ff4f7c01..55f2e50cf745 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MarketplaceType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MarketplaceType.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.providerhub.models; /** - * Defines values for MarketplaceType. + * The marketplace type. */ public enum MarketplaceType { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MessageScope.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MessageScope.java index ef9d0c18da80..a7630cd4a993 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MessageScope.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/MessageScope.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for MessageScope. + * The message scope. */ public final class MessageScope extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NewRegionFrontloadReleases.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NewRegionFrontloadReleases.java new file mode 100644 index 000000000000..3e0afb766e7e --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NewRegionFrontloadReleases.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NewRegionFrontloadReleases. + */ +public interface NewRegionFrontloadReleases { + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response generateManifestWithResponse(String providerNamespace, + FrontloadPayload properties, Context context); + + /** + * Generates the new region frontload manifest. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param properties The properties 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. + * @return the response. + */ + ResourceProviderManifest generateManifest(String providerNamespace, FrontloadPayload properties); + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response createOrUpdateWithResponse(String providerNamespace, String releaseName, + FrontloadPayload properties, Context context); + + /** + * Creates or updates a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param properties The properties 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. + * @return the response. + */ + DefaultRollout createOrUpdate(String providerNamespace, String releaseName, FrontloadPayload properties); + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release along with {@link Response}. + */ + Response getWithResponse(String providerNamespace, String releaseName, Context context); + + /** + * Gets a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a new region frontload release. + */ + DefaultRollout get(String providerNamespace, String releaseName); + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response stopWithResponse(String providerNamespace, String releaseName, Context context); + + /** + * Stops a new region frontload release. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param releaseName The name of the release. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(String providerNamespace, String releaseName); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Notification.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Notification.java new file mode 100644 index 000000000000..4f97566b3bf7 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Notification.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Notification model. + */ +@Fluent +public final class Notification implements JsonSerializable { + /* + * The notification type. + */ + private NotificationType notificationType; + + /* + * Whether notifications should be skipped. + */ + private SkipNotifications skipNotifications; + + /** + * Creates an instance of Notification class. + */ + public Notification() { + } + + /** + * Get the notificationType property: The notification type. + * + * @return the notificationType value. + */ + public NotificationType notificationType() { + return this.notificationType; + } + + /** + * Set the notificationType property: The notification type. + * + * @param notificationType the notificationType value to set. + * @return the Notification object itself. + */ + public Notification withNotificationType(NotificationType notificationType) { + this.notificationType = notificationType; + return this; + } + + /** + * Get the skipNotifications property: Whether notifications should be skipped. + * + * @return the skipNotifications value. + */ + public SkipNotifications skipNotifications() { + return this.skipNotifications; + } + + /** + * Set the skipNotifications property: Whether notifications should be skipped. + * + * @param skipNotifications the skipNotifications value to set. + * @return the Notification object itself. + */ + public Notification withSkipNotifications(SkipNotifications skipNotifications) { + this.skipNotifications = skipNotifications; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("notificationType", + this.notificationType == null ? null : this.notificationType.toString()); + jsonWriter.writeStringField("skipNotifications", + this.skipNotifications == null ? null : this.skipNotifications.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Notification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Notification 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 Notification. + */ + public static Notification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Notification deserializedNotification = new Notification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("notificationType".equals(fieldName)) { + deserializedNotification.notificationType = NotificationType.fromString(reader.getString()); + } else if ("skipNotifications".equals(fieldName)) { + deserializedNotification.skipNotifications = SkipNotifications.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNotification; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpoint.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpoint.java index 72bf6cf77eb2..1cccd0203de0 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpoint.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpoint.java @@ -18,12 +18,12 @@ @Fluent public final class NotificationEndpoint implements JsonSerializable { /* - * The notificationDestination property. + * The notification destination. */ private String notificationDestination; /* - * The locations property. + * The locations. */ private List locations; @@ -34,7 +34,7 @@ public NotificationEndpoint() { } /** - * Get the notificationDestination property: The notificationDestination property. + * Get the notificationDestination property: The notification destination. * * @return the notificationDestination value. */ @@ -43,7 +43,7 @@ public String notificationDestination() { } /** - * Set the notificationDestination property: The notificationDestination property. + * Set the notificationDestination property: The notification destination. * * @param notificationDestination the notificationDestination value to set. * @return the NotificationEndpoint object itself. @@ -54,7 +54,7 @@ public NotificationEndpoint withNotificationDestination(String notificationDesti } /** - * Get the locations property: The locations property. + * Get the locations property: The locations. * * @return the locations value. */ @@ -63,7 +63,7 @@ public List locations() { } /** - * Set the locations property: The locations property. + * Set the locations property: The locations. * * @param locations the locations value to set. * @return the NotificationEndpoint object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpointType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpointType.java new file mode 100644 index 000000000000..e7d2a66112e2 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationEndpointType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The endpoint type. + */ +public final class NotificationEndpointType extends ExpandableStringEnum { + /** + * Static value Webhook for NotificationEndpointType. + */ + public static final NotificationEndpointType WEBHOOK = fromString("Webhook"); + + /** + * Static value Eventhub for NotificationEndpointType. + */ + public static final NotificationEndpointType EVENTHUB = fromString("Eventhub"); + + /** + * Creates a new instance of NotificationEndpointType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NotificationEndpointType() { + } + + /** + * Creates or finds a NotificationEndpointType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NotificationEndpointType. + */ + public static NotificationEndpointType fromString(String name) { + return fromString(name, NotificationEndpointType.class); + } + + /** + * Gets known NotificationEndpointType values. + * + * @return known NotificationEndpointType values. + */ + public static Collection values() { + return values(NotificationEndpointType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationMode.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationMode.java index 155d75e0c35b..25c7322250ad 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationMode.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationMode.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for NotificationMode. + * The notification mode. */ public final class NotificationMode extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationOptions.java new file mode 100644 index 000000000000..752dcc38cd03 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationOptions.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Notification options. + */ +public final class NotificationOptions extends ExpandableStringEnum { + /** + * Static value NotSpecified for NotificationOptions. + */ + public static final NotificationOptions NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value None for NotificationOptions. + */ + public static final NotificationOptions NONE = fromString("None"); + + /** + * Static value EmitSpendingLimit for NotificationOptions. + */ + public static final NotificationOptions EMIT_SPENDING_LIMIT = fromString("EmitSpendingLimit"); + + /** + * Creates a new instance of NotificationOptions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NotificationOptions() { + } + + /** + * Creates or finds a NotificationOptions from its string representation. + * + * @param name a name to look for. + * @return the corresponding NotificationOptions. + */ + public static NotificationOptions fromString(String name) { + return fromString(name, NotificationOptions.class); + } + + /** + * Gets known NotificationOptions values. + * + * @return known NotificationOptions values. + */ + public static Collection values() { + return values(NotificationOptions.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistration.java index b11c6a72d6b0..36ea0784e95d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistration.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistration.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.providerhub.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.NotificationRegistrationInner; @@ -39,6 +40,13 @@ public interface NotificationRegistration { */ NotificationRegistrationProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.NotificationRegistrationInner object. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationArrayResponseWithContinuation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationArrayResponseWithContinuation.java index b085b71bd7a0..d287705452e3 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationArrayResponseWithContinuation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationArrayResponseWithContinuation.java @@ -20,7 +20,7 @@ public final class NotificationRegistrationArrayResponseWithContinuation implements JsonSerializable { /* - * The value property. + * The value. */ private List value; @@ -36,7 +36,7 @@ public NotificationRegistrationArrayResponseWithContinuation() { } /** - * Get the value property: The value property. + * Get the value property: The value. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Set the value property: The value property. + * Set the value property: The value. * * @param value the value value to set. * @return the NotificationRegistrationArrayResponseWithContinuation object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationProperties.java index 3c6ec78ffd47..8423c6f9456a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; @@ -15,7 +16,32 @@ * The NotificationRegistrationProperties model. */ @Fluent -public final class NotificationRegistrationProperties extends NotificationRegistrationPropertiesAutoGenerated { +public final class NotificationRegistrationProperties implements JsonSerializable { + /* + * The notification mode. + */ + private NotificationMode notificationMode; + + /* + * The message scope. + */ + private MessageScope messageScope; + + /* + * The included events. + */ + private List includedEvents; + + /* + * The notification endpoints. + */ + private List notificationEndpoints; + + /* + * The provisioned state of the resource. + */ + private ProvisioningState provisioningState; + /** * Creates an instance of NotificationRegistrationProperties class. */ @@ -23,49 +49,93 @@ public NotificationRegistrationProperties() { } /** - * {@inheritDoc} + * Get the notificationMode property: The notification mode. + * + * @return the notificationMode value. + */ + public NotificationMode notificationMode() { + return this.notificationMode; + } + + /** + * Set the notificationMode property: The notification mode. + * + * @param notificationMode the notificationMode value to set. + * @return the NotificationRegistrationProperties object itself. */ - @Override public NotificationRegistrationProperties withNotificationMode(NotificationMode notificationMode) { - super.withNotificationMode(notificationMode); + this.notificationMode = notificationMode; return this; } /** - * {@inheritDoc} + * Get the messageScope property: The message scope. + * + * @return the messageScope value. + */ + public MessageScope messageScope() { + return this.messageScope; + } + + /** + * Set the messageScope property: The message scope. + * + * @param messageScope the messageScope value to set. + * @return the NotificationRegistrationProperties object itself. */ - @Override public NotificationRegistrationProperties withMessageScope(MessageScope messageScope) { - super.withMessageScope(messageScope); + this.messageScope = messageScope; return this; } /** - * {@inheritDoc} + * Get the includedEvents property: The included events. + * + * @return the includedEvents value. + */ + public List includedEvents() { + return this.includedEvents; + } + + /** + * Set the includedEvents property: The included events. + * + * @param includedEvents the includedEvents value to set. + * @return the NotificationRegistrationProperties object itself. */ - @Override public NotificationRegistrationProperties withIncludedEvents(List includedEvents) { - super.withIncludedEvents(includedEvents); + this.includedEvents = includedEvents; return this; } /** - * {@inheritDoc} + * Get the notificationEndpoints property: The notification endpoints. + * + * @return the notificationEndpoints value. + */ + public List notificationEndpoints() { + return this.notificationEndpoints; + } + + /** + * Set the notificationEndpoints property: The notification endpoints. + * + * @param notificationEndpoints the notificationEndpoints value to set. + * @return the NotificationRegistrationProperties object itself. */ - @Override public NotificationRegistrationProperties withNotificationEndpoints(List notificationEndpoints) { - super.withNotificationEndpoints(notificationEndpoints); + this.notificationEndpoints = notificationEndpoints; return this; } /** - * {@inheritDoc} + * Get the provisioningState property: The provisioned state of the resource. + * + * @return the provisioningState value. */ - @Override - public NotificationRegistrationProperties withProvisioningState(ProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** @@ -73,7 +143,6 @@ public NotificationRegistrationProperties withProvisioningState(ProvisioningStat * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (notificationEndpoints() != null) { notificationEndpoints().forEach(e -> e.validate()); @@ -87,14 +156,12 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("notificationMode", - notificationMode() == null ? null : notificationMode().toString()); - jsonWriter.writeStringField("messageScope", messageScope() == null ? null : messageScope().toString()); - jsonWriter.writeArrayField("includedEvents", includedEvents(), + this.notificationMode == null ? null : this.notificationMode.toString()); + jsonWriter.writeStringField("messageScope", this.messageScope == null ? null : this.messageScope.toString()); + jsonWriter.writeArrayField("includedEvents", this.includedEvents, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("notificationEndpoints", notificationEndpoints(), + jsonWriter.writeArrayField("notificationEndpoints", this.notificationEndpoints, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); return jsonWriter.writeEndObject(); } @@ -115,21 +182,21 @@ public static NotificationRegistrationProperties fromJson(JsonReader jsonReader) reader.nextToken(); if ("notificationMode".equals(fieldName)) { - deserializedNotificationRegistrationProperties - .withNotificationMode(NotificationMode.fromString(reader.getString())); + deserializedNotificationRegistrationProperties.notificationMode + = NotificationMode.fromString(reader.getString()); } else if ("messageScope".equals(fieldName)) { - deserializedNotificationRegistrationProperties - .withMessageScope(MessageScope.fromString(reader.getString())); + deserializedNotificationRegistrationProperties.messageScope + = MessageScope.fromString(reader.getString()); } else if ("includedEvents".equals(fieldName)) { List includedEvents = reader.readArray(reader1 -> reader1.getString()); - deserializedNotificationRegistrationProperties.withIncludedEvents(includedEvents); + deserializedNotificationRegistrationProperties.includedEvents = includedEvents; } else if ("notificationEndpoints".equals(fieldName)) { List notificationEndpoints = reader.readArray(reader1 -> NotificationEndpoint.fromJson(reader1)); - deserializedNotificationRegistrationProperties.withNotificationEndpoints(notificationEndpoints); + deserializedNotificationRegistrationProperties.notificationEndpoints = notificationEndpoints; } else if ("provisioningState".equals(fieldName)) { - deserializedNotificationRegistrationProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); + deserializedNotificationRegistrationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationPropertiesAutoGenerated.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationPropertiesAutoGenerated.java deleted file mode 100644 index 86ac5fbddfce..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationRegistrationPropertiesAutoGenerated.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The NotificationRegistrationPropertiesAutoGenerated model. - */ -@Fluent -public class NotificationRegistrationPropertiesAutoGenerated - implements JsonSerializable { - /* - * The notificationMode property. - */ - private NotificationMode notificationMode; - - /* - * The messageScope property. - */ - private MessageScope messageScope; - - /* - * The includedEvents property. - */ - private List includedEvents; - - /* - * The notificationEndpoints property. - */ - private List notificationEndpoints; - - /* - * The provisioningState property. - */ - private ProvisioningState provisioningState; - - /** - * Creates an instance of NotificationRegistrationPropertiesAutoGenerated class. - */ - public NotificationRegistrationPropertiesAutoGenerated() { - } - - /** - * Get the notificationMode property: The notificationMode property. - * - * @return the notificationMode value. - */ - public NotificationMode notificationMode() { - return this.notificationMode; - } - - /** - * Set the notificationMode property: The notificationMode property. - * - * @param notificationMode the notificationMode value to set. - * @return the NotificationRegistrationPropertiesAutoGenerated object itself. - */ - public NotificationRegistrationPropertiesAutoGenerated withNotificationMode(NotificationMode notificationMode) { - this.notificationMode = notificationMode; - return this; - } - - /** - * Get the messageScope property: The messageScope property. - * - * @return the messageScope value. - */ - public MessageScope messageScope() { - return this.messageScope; - } - - /** - * Set the messageScope property: The messageScope property. - * - * @param messageScope the messageScope value to set. - * @return the NotificationRegistrationPropertiesAutoGenerated object itself. - */ - public NotificationRegistrationPropertiesAutoGenerated withMessageScope(MessageScope messageScope) { - this.messageScope = messageScope; - return this; - } - - /** - * Get the includedEvents property: The includedEvents property. - * - * @return the includedEvents value. - */ - public List includedEvents() { - return this.includedEvents; - } - - /** - * Set the includedEvents property: The includedEvents property. - * - * @param includedEvents the includedEvents value to set. - * @return the NotificationRegistrationPropertiesAutoGenerated object itself. - */ - public NotificationRegistrationPropertiesAutoGenerated withIncludedEvents(List includedEvents) { - this.includedEvents = includedEvents; - return this; - } - - /** - * Get the notificationEndpoints property: The notificationEndpoints property. - * - * @return the notificationEndpoints value. - */ - public List notificationEndpoints() { - return this.notificationEndpoints; - } - - /** - * Set the notificationEndpoints property: The notificationEndpoints property. - * - * @param notificationEndpoints the notificationEndpoints value to set. - * @return the NotificationRegistrationPropertiesAutoGenerated object itself. - */ - public NotificationRegistrationPropertiesAutoGenerated - withNotificationEndpoints(List notificationEndpoints) { - this.notificationEndpoints = notificationEndpoints; - return this; - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The provisioningState property. - * - * @param provisioningState the provisioningState value to set. - * @return the NotificationRegistrationPropertiesAutoGenerated object itself. - */ - public NotificationRegistrationPropertiesAutoGenerated withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (notificationEndpoints() != null) { - notificationEndpoints().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("notificationMode", - this.notificationMode == null ? null : this.notificationMode.toString()); - jsonWriter.writeStringField("messageScope", this.messageScope == null ? null : this.messageScope.toString()); - jsonWriter.writeArrayField("includedEvents", this.includedEvents, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("notificationEndpoints", this.notificationEndpoints, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NotificationRegistrationPropertiesAutoGenerated from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NotificationRegistrationPropertiesAutoGenerated 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 NotificationRegistrationPropertiesAutoGenerated. - */ - public static NotificationRegistrationPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NotificationRegistrationPropertiesAutoGenerated deserializedNotificationRegistrationPropertiesAutoGenerated - = new NotificationRegistrationPropertiesAutoGenerated(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("notificationMode".equals(fieldName)) { - deserializedNotificationRegistrationPropertiesAutoGenerated.notificationMode - = NotificationMode.fromString(reader.getString()); - } else if ("messageScope".equals(fieldName)) { - deserializedNotificationRegistrationPropertiesAutoGenerated.messageScope - = MessageScope.fromString(reader.getString()); - } else if ("includedEvents".equals(fieldName)) { - List includedEvents = reader.readArray(reader1 -> reader1.getString()); - deserializedNotificationRegistrationPropertiesAutoGenerated.includedEvents = includedEvents; - } else if ("notificationEndpoints".equals(fieldName)) { - List notificationEndpoints - = reader.readArray(reader1 -> NotificationEndpoint.fromJson(reader1)); - deserializedNotificationRegistrationPropertiesAutoGenerated.notificationEndpoints - = notificationEndpoints; - } else if ("provisioningState".equals(fieldName)) { - deserializedNotificationRegistrationPropertiesAutoGenerated.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedNotificationRegistrationPropertiesAutoGenerated; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationType.java new file mode 100644 index 000000000000..61f69d9e8c04 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/NotificationType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The notification type. + */ +public final class NotificationType extends ExpandableStringEnum { + /** + * Static value Unspecified for NotificationType. + */ + public static final NotificationType UNSPECIFIED = fromString("Unspecified"); + + /** + * Static value SubscriptionNotification for NotificationType. + */ + public static final NotificationType SUBSCRIPTION_NOTIFICATION = fromString("SubscriptionNotification"); + + /** + * Creates a new instance of NotificationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NotificationType() { + } + + /** + * Creates or finds a NotificationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NotificationType. + */ + public static NotificationType fromString(String name) { + return fromString(name, NotificationType.class); + } + + /** + * Gets known NotificationType values. + * + * @return known NotificationType values. + */ + public static Collection values() { + return values(NotificationType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiConfiguration.java new file mode 100644 index 000000000000..a95393816e71 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiConfiguration.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The OpenApiConfiguration model. + */ +@Fluent +public final class OpenApiConfiguration implements JsonSerializable { + /* + * The open api validation. + */ + private OpenApiValidation validation; + + /** + * Creates an instance of OpenApiConfiguration class. + */ + public OpenApiConfiguration() { + } + + /** + * Get the validation property: The open api validation. + * + * @return the validation value. + */ + public OpenApiValidation validation() { + return this.validation; + } + + /** + * Set the validation property: The open api validation. + * + * @param validation the validation value to set. + * @return the OpenApiConfiguration object itself. + */ + public OpenApiConfiguration withValidation(OpenApiValidation validation) { + this.validation = validation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (validation() != null) { + validation().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("validation", this.validation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OpenApiConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OpenApiConfiguration 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 OpenApiConfiguration. + */ + public static OpenApiConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OpenApiConfiguration deserializedOpenApiConfiguration = new OpenApiConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("validation".equals(fieldName)) { + deserializedOpenApiConfiguration.validation = OpenApiValidation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOpenApiConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiValidation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiValidation.java new file mode 100644 index 000000000000..ba7254622d60 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OpenApiValidation.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The OpenApiValidation model. + */ +@Fluent +public final class OpenApiValidation implements JsonSerializable { + /* + * Indicates whether a non compliance response is allowed for a LIST call + */ + private Boolean allowNoncompliantCollectionResponse; + + /** + * Creates an instance of OpenApiValidation class. + */ + public OpenApiValidation() { + } + + /** + * Get the allowNoncompliantCollectionResponse property: Indicates whether a non compliance response is allowed for + * a LIST call. + * + * @return the allowNoncompliantCollectionResponse value. + */ + public Boolean allowNoncompliantCollectionResponse() { + return this.allowNoncompliantCollectionResponse; + } + + /** + * Set the allowNoncompliantCollectionResponse property: Indicates whether a non compliance response is allowed for + * a LIST call. + * + * @param allowNoncompliantCollectionResponse the allowNoncompliantCollectionResponse value to set. + * @return the OpenApiValidation object itself. + */ + public OpenApiValidation withAllowNoncompliantCollectionResponse(Boolean allowNoncompliantCollectionResponse) { + this.allowNoncompliantCollectionResponse = allowNoncompliantCollectionResponse; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("allowNoncompliantCollectionResponse", this.allowNoncompliantCollectionResponse); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OpenApiValidation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OpenApiValidation 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 OpenApiValidation. + */ + public static OpenApiValidation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OpenApiValidation deserializedOpenApiValidation = new OpenApiValidation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowNoncompliantCollectionResponse".equals(fieldName)) { + deserializedOpenApiValidation.allowNoncompliantCollectionResponse + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedOpenApiValidation; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationActionType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationActionType.java index 6381130210b4..228be0085647 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationActionType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationActionType.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.providerhub.models; /** - * Defines values for OperationActionType. + * The action type. */ public enum OperationActionType { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationOrigins.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationOrigins.java index 1d3b0b419b5b..c7d405606263 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationOrigins.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationOrigins.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.providerhub.models; /** - * Defines values for OperationOrigins. + * The origin. */ public enum OperationOrigins { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Operations.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Operations.java index c9f47c9d6242..ab934faad949 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Operations.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Operations.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; import java.util.List; /** @@ -68,8 +69,8 @@ Response> listByProviderRegistrationWithResponse(Stri * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response createOrUpdateWithResponse(String providerNamespace, - OperationsPutContent operationsPutContent, Context context); + Response createOrUpdateWithResponse(String providerNamespace, + OperationsPutContentInner operationsPutContent, Context context); /** * Creates or updates the operation supported by the given provider. @@ -81,7 +82,7 @@ Response createOrUpdateWithResponse(String providerNamespace, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - OperationsContent createOrUpdate(String providerNamespace, OperationsPutContent operationsPutContent); + OperationsPutContent createOrUpdate(String providerNamespace, OperationsPutContentInner operationsPutContent); /** * Deletes an operation. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContent.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContent.java deleted file mode 100644 index 2d5bd6927d57..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContent.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.resourcemanager.providerhub.fluent.models.OperationsContentInner; - -/** - * An immutable client-side representation of OperationsContent. - */ -public interface OperationsContent { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the namePropertiesName property: Name of the operation. - * - * @return the namePropertiesName value. - */ - String namePropertiesName(); - - /** - * Gets the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the origin property: The origin property. - * - * @return the origin value. - */ - OperationOrigins origin(); - - /** - * Gets the display property: Display information of the operation. - * - * @return the display value. - */ - OperationsDefinitionDisplay display(); - - /** - * Gets the actionType property: The actionType property. - * - * @return the actionType value. - */ - OperationActionType actionType(); - - /** - * Gets the properties property: Anything. - * - * @return the properties value. - */ - Object properties(); - - /** - * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.OperationsContentInner object. - * - * @return the inner object. - */ - OperationsContentInner innerModel(); -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContentProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContentProperties.java new file mode 100644 index 000000000000..ed45b1c138e6 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsContentProperties.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The OperationsContentProperties model. + */ +@Fluent +public class OperationsContentProperties implements JsonSerializable { + /* + * Operations content. + */ + private List contents; + + /** + * Creates an instance of OperationsContentProperties class. + */ + public OperationsContentProperties() { + } + + /** + * Get the contents property: Operations content. + * + * @return the contents value. + */ + public List contents() { + return this.contents; + } + + /** + * Set the contents property: Operations content. + * + * @param contents the contents value to set. + * @return the OperationsContentProperties object itself. + */ + public OperationsContentProperties withContents(List contents) { + this.contents = contents; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contents() != null) { + contents().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("contents", this.contents, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationsContentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationsContentProperties 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 OperationsContentProperties. + */ + public static OperationsContentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationsContentProperties deserializedOperationsContentProperties = new OperationsContentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("contents".equals(fieldName)) { + List contents + = reader.readArray(reader1 -> LocalizedOperationDefinition.fromJson(reader1)); + deserializedOperationsContentProperties.contents = contents; + } else { + reader.skipChildren(); + } + } + + return deserializedOperationsContentProperties; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinition.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinition.java index a7d36142fd13..23ed1669b5c9 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinition.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinition.java @@ -25,7 +25,7 @@ public interface OperationsDefinition { Boolean isDataAction(); /** - * Gets the origin property: The origin property. + * Gets the origin property: The origin. * * @return the origin value. */ @@ -39,7 +39,7 @@ public interface OperationsDefinition { OperationsDefinitionDisplay display(); /** - * Gets the actionType property: The actionType property. + * Gets the actionType property: The action type. * * @return the actionType value. */ diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinitionArrayResponseWithContinuation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinitionArrayResponseWithContinuation.java index de67d313ac3a..104cf0ecbce6 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinitionArrayResponseWithContinuation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDefinitionArrayResponseWithContinuation.java @@ -20,7 +20,7 @@ public final class OperationsDefinitionArrayResponseWithContinuation implements JsonSerializable { /* - * The value property. + * The value. */ private List value; @@ -36,7 +36,7 @@ public OperationsDefinitionArrayResponseWithContinuation() { } /** - * Get the value property: The value property. + * Get the value property: The value. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Set the value property: The value property. + * Set the value property: The value. * * @param value the value value to set. * @return the OperationsDefinitionArrayResponseWithContinuation object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDisplayDefinition.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDisplayDefinition.java index 64cee3574505..0bcc2a7f7d70 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDisplayDefinition.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsDisplayDefinition.java @@ -18,22 +18,22 @@ @Fluent public class OperationsDisplayDefinition implements JsonSerializable { /* - * The provider property. + * The provider. */ private String provider; /* - * The resource property. + * The resource. */ private String resource; /* - * The operation property. + * The operation. */ private String operation; /* - * The description property. + * The description. */ private String description; @@ -44,7 +44,7 @@ public OperationsDisplayDefinition() { } /** - * Get the provider property: The provider property. + * Get the provider property: The provider. * * @return the provider value. */ @@ -53,7 +53,7 @@ public String provider() { } /** - * Set the provider property: The provider property. + * Set the provider property: The provider. * * @param provider the provider value to set. * @return the OperationsDisplayDefinition object itself. @@ -64,7 +64,7 @@ public OperationsDisplayDefinition withProvider(String provider) { } /** - * Get the resource property: The resource property. + * Get the resource property: The resource. * * @return the resource value. */ @@ -73,7 +73,7 @@ public String resource() { } /** - * Set the resource property: The resource property. + * Set the resource property: The resource. * * @param resource the resource value to set. * @return the OperationsDisplayDefinition object itself. @@ -84,7 +84,7 @@ public OperationsDisplayDefinition withResource(String resource) { } /** - * Get the operation property: The operation property. + * Get the operation property: The operation. * * @return the operation value. */ @@ -93,7 +93,7 @@ public String operation() { } /** - * Set the operation property: The operation property. + * Set the operation property: The operation. * * @param operation the operation value to set. * @return the OperationsDisplayDefinition object itself. @@ -104,7 +104,7 @@ public OperationsDisplayDefinition withOperation(String operation) { } /** - * Get the description property: The description property. + * Get the description property: The description. * * @return the description value. */ @@ -113,7 +113,7 @@ public String description() { } /** - * Set the description property: The description property. + * Set the description property: The description. * * @param description the description value to set. * @return the OperationsDisplayDefinition object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContent.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContent.java index 8be10db64a8d..3feddd89c1d5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContent.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContent.java @@ -4,104 +4,52 @@ package com.azure.resourcemanager.providerhub.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import java.io.IOException; -import java.util.List; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; /** - * The OperationsPutContent model. + * An immutable client-side representation of OperationsPutContent. */ -@Fluent -public final class OperationsPutContent implements JsonSerializable { - /* - * The contents property. - */ - private List contents; - +public interface OperationsPutContent { /** - * Creates an instance of OperationsPutContent class. + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. */ - public OperationsPutContent() { - } + String id(); /** - * Get the contents property: The contents property. + * Gets the name property: The name of the resource. * - * @return the contents value. + * @return the name value. */ - public List contents() { - return this.contents; - } + String name(); /** - * Set the contents property: The contents property. + * Gets the type property: The type of the resource. * - * @param contents the contents value to set. - * @return the OperationsPutContent object itself. + * @return the type value. */ - public OperationsPutContent withContents(List contents) { - this.contents = contents; - return this; - } + String type(); /** - * Validates the instance. + * Gets the properties property: The properties property. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the properties value. */ - public void validate() { - if (contents() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property contents in model OperationsPutContent")); - } else { - contents().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OperationsPutContent.class); + OperationsPutContentProperties properties(); /** - * {@inheritDoc} + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("contents", this.contents, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } + SystemData systemData(); /** - * Reads an instance of OperationsPutContent from the JsonReader. + * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner object. * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationsPutContent 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 OperationsPutContent. + * @return the inner object. */ - public static OperationsPutContent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationsPutContent deserializedOperationsPutContent = new OperationsPutContent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("contents".equals(fieldName)) { - List contents - = reader.readArray(reader1 -> OperationsDefinitionInner.fromJson(reader1)); - deserializedOperationsPutContent.contents = contents; - } else { - reader.skipChildren(); - } - } - - return deserializedOperationsPutContent; - }); - } + OperationsPutContentInner innerModel(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContentProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContentProperties.java new file mode 100644 index 000000000000..787e7632cd66 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OperationsPutContentProperties.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The OperationsPutContentProperties model. + */ +@Fluent +public final class OperationsPutContentProperties extends OperationsContentProperties { + /** + * Creates an instance of OperationsPutContentProperties class. + */ + public OperationsPutContentProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public OperationsPutContentProperties withContents(List contents) { + super.withContents(contents); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (contents() != null) { + contents().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("contents", contents(), (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationsPutContentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationsPutContentProperties 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 OperationsPutContentProperties. + */ + public static OperationsPutContentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationsPutContentProperties deserializedOperationsPutContentProperties + = new OperationsPutContentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("contents".equals(fieldName)) { + List contents + = reader.readArray(reader1 -> LocalizedOperationDefinition.fromJson(reader1)); + deserializedOperationsPutContentProperties.withContents(contents); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationsPutContentProperties; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptInHeaderType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptInHeaderType.java index 96afb2c82bdf..2ba2ec0bca05 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptInHeaderType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptInHeaderType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for OptInHeaderType. + * The opt in headers. */ public final class OptInHeaderType extends ExpandableStringEnum { /** @@ -37,6 +37,42 @@ public final class OptInHeaderType extends ExpandableStringEnum public static final OptInHeaderType UNBOUNDED_CLIENT_GROUP_MEMBERSHIP = fromString("UnboundedClientGroupMembership"); + /** + * Static value PrivateLinkId for OptInHeaderType. + */ + public static final OptInHeaderType PRIVATE_LINK_ID = fromString("PrivateLinkId"); + + /** + * Static value PrivateLinkResourceId for OptInHeaderType. + */ + public static final OptInHeaderType PRIVATE_LINK_RESOURCE_ID = fromString("PrivateLinkResourceId"); + + /** + * Static value ManagementGroupAncestorsEncoded for OptInHeaderType. + */ + public static final OptInHeaderType MANAGEMENT_GROUP_ANCESTORS_ENCODED + = fromString("ManagementGroupAncestorsEncoded"); + + /** + * Static value PrivateLinkVnetTrafficTag for OptInHeaderType. + */ + public static final OptInHeaderType PRIVATE_LINK_VNET_TRAFFIC_TAG = fromString("PrivateLinkVnetTrafficTag"); + + /** + * Static value ResourceGroupLocation for OptInHeaderType. + */ + public static final OptInHeaderType RESOURCE_GROUP_LOCATION = fromString("ResourceGroupLocation"); + + /** + * Static value ClientPrincipalNameEncoded for OptInHeaderType. + */ + public static final OptInHeaderType CLIENT_PRINCIPAL_NAME_ENCODED = fromString("ClientPrincipalNameEncoded"); + + /** + * Static value MSIResourceIdEncoded for OptInHeaderType. + */ + public static final OptInHeaderType MSIRESOURCE_ID_ENCODED = fromString("MSIResourceIdEncoded"); + /** * Creates a new instance of OptInHeaderType value. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptOutHeaderType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptOutHeaderType.java new file mode 100644 index 000000000000..221d042630bf --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/OptOutHeaderType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The opt out headers. + */ +public final class OptOutHeaderType extends ExpandableStringEnum { + /** + * Static value NotSpecified for OptOutHeaderType. + */ + public static final OptOutHeaderType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value SystemDataCreatedByLastModifiedBy for OptOutHeaderType. + */ + public static final OptOutHeaderType SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY + = fromString("SystemDataCreatedByLastModifiedBy"); + + /** + * Creates a new instance of OptOutHeaderType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OptOutHeaderType() { + } + + /** + * Creates or finds a OptOutHeaderType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OptOutHeaderType. + */ + public static OptOutHeaderType fromString(String name) { + return fromString(name, OptOutHeaderType.class); + } + + /** + * Gets known OptOutHeaderType values. + * + * @return known OptOutHeaderType values. + */ + public static Collection values() { + return values(OptOutHeaderType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Policy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Policy.java new file mode 100644 index 000000000000..2ba3af5b7f61 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Policy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The policy. + */ +public final class Policy extends ExpandableStringEnum { + /** + * Static value NotSpecified for Policy. + */ + public static final Policy NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value SynchronizeBeginExtension for Policy. + */ + public static final Policy SYNCHRONIZE_BEGIN_EXTENSION = fromString("SynchronizeBeginExtension"); + + /** + * Creates a new instance of Policy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Policy() { + } + + /** + * Creates or finds a Policy from its string representation. + * + * @param name a name to look for. + * @return the corresponding Policy. + */ + public static Policy fromString(String name) { + return fromString(name, Policy.class); + } + + /** + * Gets known Policy values. + * + * @return known Policy values. + */ + public static Collection values() { + return values(Policy.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PolicyExecutionType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PolicyExecutionType.java new file mode 100644 index 000000000000..409de8f4d57d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PolicyExecutionType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The policy execution type. + */ +public final class PolicyExecutionType extends ExpandableStringEnum { + /** + * Static value NotSpecified for PolicyExecutionType. + */ + public static final PolicyExecutionType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value ExecutePolicies for PolicyExecutionType. + */ + public static final PolicyExecutionType EXECUTE_POLICIES = fromString("ExecutePolicies"); + + /** + * Static value BypassPolicies for PolicyExecutionType. + */ + public static final PolicyExecutionType BYPASS_POLICIES = fromString("BypassPolicies"); + + /** + * Static value ExpectPartialPutRequests for PolicyExecutionType. + */ + public static final PolicyExecutionType EXPECT_PARTIAL_PUT_REQUESTS = fromString("ExpectPartialPutRequests"); + + /** + * Creates a new instance of PolicyExecutionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyExecutionType() { + } + + /** + * Creates or finds a PolicyExecutionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyExecutionType. + */ + public static PolicyExecutionType fromString(String name) { + return fromString(name, PolicyExecutionType.class); + } + + /** + * Gets known PolicyExecutionType values. + * + * @return known PolicyExecutionType values. + */ + public static Collection values() { + return values(PolicyExecutionType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PrivateResourceProviderConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PrivateResourceProviderConfiguration.java new file mode 100644 index 000000000000..c7a6e2e859c0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/PrivateResourceProviderConfiguration.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The PrivateResourceProviderConfiguration model. + */ +@Fluent +public class PrivateResourceProviderConfiguration implements JsonSerializable { + /* + * The allowed subscriptions. + */ + private List allowedSubscriptions; + + /** + * Creates an instance of PrivateResourceProviderConfiguration class. + */ + public PrivateResourceProviderConfiguration() { + } + + /** + * Get the allowedSubscriptions property: The allowed subscriptions. + * + * @return the allowedSubscriptions value. + */ + public List allowedSubscriptions() { + return this.allowedSubscriptions; + } + + /** + * Set the allowedSubscriptions property: The allowed subscriptions. + * + * @param allowedSubscriptions the allowedSubscriptions value to set. + * @return the PrivateResourceProviderConfiguration object itself. + */ + public PrivateResourceProviderConfiguration withAllowedSubscriptions(List allowedSubscriptions) { + this.allowedSubscriptions = allowedSubscriptions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("allowedSubscriptions", this.allowedSubscriptions, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateResourceProviderConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateResourceProviderConfiguration 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 PrivateResourceProviderConfiguration. + */ + public static PrivateResourceProviderConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateResourceProviderConfiguration deserializedPrivateResourceProviderConfiguration + = new PrivateResourceProviderConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowedSubscriptions".equals(fieldName)) { + List allowedSubscriptions = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateResourceProviderConfiguration.allowedSubscriptions = allowedSubscriptions; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateResourceProviderConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadata.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadata.java index 14fa6ec235c3..a6d023697040 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadata.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadata.java @@ -18,20 +18,35 @@ @Fluent public class ProviderHubMetadata implements JsonSerializable { /* - * The providerAuthorizations property. + * The provider authorizations. */ private List providerAuthorizations; /* - * The providerAuthentication property. + * The provider authentication. */ private ProviderHubMetadataProviderAuthentication providerAuthentication; /* - * The thirdPartyProviderAuthorization property. + * The third party provider authorization. */ private ProviderHubMetadataThirdPartyProviderAuthorization thirdPartyProviderAuthorization; + /* + * The direct RP role definition id. + */ + private String directRpRoleDefinitionId; + + /* + * The regional async operation resource type name. + */ + private String regionalAsyncOperationResourceTypeName; + + /* + * The global async operation resource type name. + */ + private String globalAsyncOperationResourceTypeName; + /** * Creates an instance of ProviderHubMetadata class. */ @@ -39,7 +54,7 @@ public ProviderHubMetadata() { } /** - * Get the providerAuthorizations property: The providerAuthorizations property. + * Get the providerAuthorizations property: The provider authorizations. * * @return the providerAuthorizations value. */ @@ -48,7 +63,7 @@ public List providerAuthorizations() { } /** - * Set the providerAuthorizations property: The providerAuthorizations property. + * Set the providerAuthorizations property: The provider authorizations. * * @param providerAuthorizations the providerAuthorizations value to set. * @return the ProviderHubMetadata object itself. @@ -59,7 +74,7 @@ public ProviderHubMetadata withProviderAuthorizations(List writer.writeJson(element)); jsonWriter.writeJsonField("providerAuthentication", this.providerAuthentication); jsonWriter.writeJsonField("thirdPartyProviderAuthorization", this.thirdPartyProviderAuthorization); + jsonWriter.writeStringField("directRpRoleDefinitionId", this.directRpRoleDefinitionId); + jsonWriter.writeStringField("regionalAsyncOperationResourceTypeName", + this.regionalAsyncOperationResourceTypeName); + jsonWriter.writeStringField("globalAsyncOperationResourceTypeName", this.globalAsyncOperationResourceTypeName); return jsonWriter.writeEndObject(); } @@ -155,6 +235,12 @@ public static ProviderHubMetadata fromJson(JsonReader jsonReader) throws IOExcep } else if ("thirdPartyProviderAuthorization".equals(fieldName)) { deserializedProviderHubMetadata.thirdPartyProviderAuthorization = ProviderHubMetadataThirdPartyProviderAuthorization.fromJson(reader); + } else if ("directRpRoleDefinitionId".equals(fieldName)) { + deserializedProviderHubMetadata.directRpRoleDefinitionId = reader.getString(); + } else if ("regionalAsyncOperationResourceTypeName".equals(fieldName)) { + deserializedProviderHubMetadata.regionalAsyncOperationResourceTypeName = reader.getString(); + } else if ("globalAsyncOperationResourceTypeName".equals(fieldName)) { + deserializedProviderHubMetadata.globalAsyncOperationResourceTypeName = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataProviderAuthentication.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataProviderAuthentication.java index f7c6101c15fd..5d0a067e12b7 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataProviderAuthentication.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataProviderAuthentication.java @@ -13,7 +13,7 @@ import java.util.List; /** - * The ProviderHubMetadataProviderAuthentication model. + * The provider authentication. */ @Fluent public final class ProviderHubMetadataProviderAuthentication extends ResourceProviderAuthentication { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataThirdPartyProviderAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataThirdPartyProviderAuthorization.java index b197c3b7b3e2..d07428c0f215 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataThirdPartyProviderAuthorization.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderHubMetadataThirdPartyProviderAuthorization.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ProviderHubMetadataThirdPartyProviderAuthorization model. + * The third party provider authorization. */ @Fluent public final class ProviderHubMetadataThirdPartyProviderAuthorization extends ThirdPartyProviderAuthorization { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSetting.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSetting.java new file mode 100644 index 000000000000..31f69e06dc08 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSetting.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.providerhub.fluent.models.ProviderMonitorSettingInner; +import java.util.Map; + +/** + * An immutable client-side representation of ProviderMonitorSetting. + */ +public interface ProviderMonitorSetting { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The properties property. + * + * @return the properties value. + */ + ProviderMonitorSettingProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.ProviderMonitorSettingInner object. + * + * @return the inner object. + */ + ProviderMonitorSettingInner innerModel(); + + /** + * The entirety of the ProviderMonitorSetting definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ProviderMonitorSetting definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ProviderMonitorSetting definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ProviderMonitorSetting definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ProviderMonitorSetting definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ProviderMonitorSetting definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ProviderMonitorSetting create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ProviderMonitorSetting create(Context context); + } + + /** + * The stage of the ProviderMonitorSetting definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the ProviderMonitorSetting definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + WithCreate withProperties(ProviderMonitorSettingProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ProviderMonitorSetting refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ProviderMonitorSetting refresh(Context context); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingArrayResponseWithContinuation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingArrayResponseWithContinuation.java new file mode 100644 index 000000000000..0aeb21744e56 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingArrayResponseWithContinuation.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.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.providerhub.fluent.models.ProviderMonitorSettingInner; +import java.io.IOException; +import java.util.List; + +/** + * The ProviderMonitorSettingArrayResponseWithContinuation model. + */ +@Fluent +public final class ProviderMonitorSettingArrayResponseWithContinuation + implements JsonSerializable { + /* + * The value property. + */ + private List value; + + /* + * The URL to get to the next set of results, if there are any. + */ + private String nextLink; + + /** + * Creates an instance of ProviderMonitorSettingArrayResponseWithContinuation class. + */ + public ProviderMonitorSettingArrayResponseWithContinuation() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the ProviderMonitorSettingArrayResponseWithContinuation object itself. + */ + public ProviderMonitorSettingArrayResponseWithContinuation withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get to the next set of results, if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL to get to the next set of results, if there are any. + * + * @param nextLink the nextLink value to set. + * @return the ProviderMonitorSettingArrayResponseWithContinuation object itself. + */ + public ProviderMonitorSettingArrayResponseWithContinuation withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + 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 ProviderMonitorSettingArrayResponseWithContinuation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderMonitorSettingArrayResponseWithContinuation 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 ProviderMonitorSettingArrayResponseWithContinuation. + */ + public static ProviderMonitorSettingArrayResponseWithContinuation fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ProviderMonitorSettingArrayResponseWithContinuation deserializedProviderMonitorSettingArrayResponseWithContinuation + = new ProviderMonitorSettingArrayResponseWithContinuation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ProviderMonitorSettingInner.fromJson(reader1)); + deserializedProviderMonitorSettingArrayResponseWithContinuation.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedProviderMonitorSettingArrayResponseWithContinuation.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderMonitorSettingArrayResponseWithContinuation; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingProperties.java new file mode 100644 index 000000000000..0ddf58441861 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettingProperties.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.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 java.io.IOException; + +/** + * The ProviderMonitorSettingProperties model. + */ +@Immutable +public final class ProviderMonitorSettingProperties implements JsonSerializable { + /* + * The provisioning state. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ProviderMonitorSettingProperties class. + */ + public ProviderMonitorSettingProperties() { + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderMonitorSettingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderMonitorSettingProperties 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 ProviderMonitorSettingProperties. + */ + public static ProviderMonitorSettingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProviderMonitorSettingProperties deserializedProviderMonitorSettingProperties + = new ProviderMonitorSettingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedProviderMonitorSettingProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderMonitorSettingProperties; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettings.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettings.java new file mode 100644 index 000000000000..a373b8b20174 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderMonitorSettings.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ProviderMonitorSettings. + */ +public interface ProviderMonitorSettings { + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String providerMonitorSettingName, Context context); + + /** + * Gets the provider monitor setting details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details. + */ + ProviderMonitorSetting getByResourceGroup(String resourceGroupName, String providerMonitorSettingName); + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response updateWithResponse(String resourceGroupName, String providerMonitorSettingName, + Context context); + + /** + * Updates the provider monitor setting properties as specified in the request body. Update fails if the specified + * provider monitor setting does not already exist. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ProviderMonitorSetting update(String resourceGroupName, String providerMonitorSettingName); + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String providerMonitorSettingName, + Context context); + + /** + * Deletes a provider monitor setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param providerMonitorSettingName The name of the provider monitor setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String providerMonitorSettingName); + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Gets the list of the provider monitor settings in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the resource group as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets the list of the provider monitor settings in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of the provider monitor settings in the subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Gets the provider monitor setting details. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details along with {@link Response}. + */ + ProviderMonitorSetting getById(String id); + + /** + * Gets the provider monitor setting details. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the provider monitor setting details along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a provider monitor setting. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a provider monitor setting. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ProviderMonitorSetting resource. + * + * @param name resource name. + * @return the first stage of the new ProviderMonitorSetting definition. + */ + ProviderMonitorSetting.DefinitionStages.Blank define(String name); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistration.java index 448c212e5bd4..0ec02125b9e5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistration.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistration.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.providerhub.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.providerhub.fluent.models.ProviderRegistrationInner; /** @@ -38,6 +39,21 @@ public interface ProviderRegistration { */ ProviderRegistrationProperties properties(); + /** + * Gets the kind property: Provider registration kind. This Metadata is also used by portal/tooling/etc to render + * different UX experiences for resources of the same type. + * + * @return the kind value. + */ + ProviderRegistrationKind kind(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.ProviderRegistrationInner object. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationArrayResponseWithContinuation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationArrayResponseWithContinuation.java index 6027fa2424a4..d4999b73dc18 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationArrayResponseWithContinuation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationArrayResponseWithContinuation.java @@ -20,7 +20,7 @@ public final class ProviderRegistrationArrayResponseWithContinuation implements JsonSerializable { /* - * The value property. + * The value. */ private List value; @@ -36,7 +36,7 @@ public ProviderRegistrationArrayResponseWithContinuation() { } /** - * Get the value property: The value property. + * Get the value property: The value. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Set the value property: The value property. + * Set the value property: The value. * * @param value the value value to set. * @return the ProviderRegistrationArrayResponseWithContinuation object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationKind.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationKind.java new file mode 100644 index 000000000000..6e872278654e --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationKind.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provider registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for + * resources of the same type. + */ +public final class ProviderRegistrationKind extends ExpandableStringEnum { + /** + * Static value Managed for ProviderRegistrationKind. + */ + public static final ProviderRegistrationKind MANAGED = fromString("Managed"); + + /** + * Static value Hybrid for ProviderRegistrationKind. + */ + public static final ProviderRegistrationKind HYBRID = fromString("Hybrid"); + + /** + * Static value Direct for ProviderRegistrationKind. + */ + public static final ProviderRegistrationKind DIRECT = fromString("Direct"); + + /** + * Creates a new instance of ProviderRegistrationKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProviderRegistrationKind() { + } + + /** + * Creates or finds a ProviderRegistrationKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProviderRegistrationKind. + */ + public static ProviderRegistrationKind fromString(String name) { + return fromString(name, ProviderRegistrationKind.class); + } + + /** + * Gets known ProviderRegistrationKind values. + * + * @return known ProviderRegistrationKind values. + */ + public static Collection values() { + return values(ProviderRegistrationKind.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationProperties.java index 04c60ec39bda..2e0b538e4082 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationProperties.java @@ -15,7 +15,32 @@ * The ProviderRegistrationProperties model. */ @Fluent -public final class ProviderRegistrationProperties extends ProviderRegistrationPropertiesAutoGenerated { +public final class ProviderRegistrationProperties extends ResourceProviderManifestProperties { + /* + * The provider hub metadata. + */ + private ProviderRegistrationPropertiesProviderHubMetadata providerHubMetadata; + + /* + * The provisioning state. + */ + private ProvisioningState provisioningState; + + /* + * The subscription lifecycle notification specifications. + */ + private ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications; + + /* + * The private resource provider configuration. + */ + private ProviderRegistrationPropertiesPrivateResourceProviderConfiguration privateResourceProviderConfiguration; + + /* + * The token auth configuration. + */ + private TokenAuthConfiguration tokenAuthConfiguration; + /** * Creates an instance of ProviderRegistrationProperties class. */ @@ -23,31 +48,98 @@ public ProviderRegistrationProperties() { } /** - * {@inheritDoc} + * Get the providerHubMetadata property: The provider hub metadata. + * + * @return the providerHubMetadata value. + */ + public ProviderRegistrationPropertiesProviderHubMetadata providerHubMetadata() { + return this.providerHubMetadata; + } + + /** + * Set the providerHubMetadata property: The provider hub metadata. + * + * @param providerHubMetadata the providerHubMetadata value to set. + * @return the ProviderRegistrationProperties object itself. */ - @Override public ProviderRegistrationProperties withProviderHubMetadata(ProviderRegistrationPropertiesProviderHubMetadata providerHubMetadata) { - super.withProviderHubMetadata(providerHubMetadata); + this.providerHubMetadata = providerHubMetadata; return this; } /** - * {@inheritDoc} + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. */ - @Override - public ProviderRegistrationProperties withProvisioningState(ProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** - * {@inheritDoc} + * Get the subscriptionLifecycleNotificationSpecifications property: The subscription lifecycle notification + * specifications. + * + * @return the subscriptionLifecycleNotificationSpecifications value. + */ + public ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + subscriptionLifecycleNotificationSpecifications() { + return this.subscriptionLifecycleNotificationSpecifications; + } + + /** + * Set the subscriptionLifecycleNotificationSpecifications property: The subscription lifecycle notification + * specifications. + * + * @param subscriptionLifecycleNotificationSpecifications the subscriptionLifecycleNotificationSpecifications value + * to set. + * @return the ProviderRegistrationProperties object itself. */ - @Override public ProviderRegistrationProperties withSubscriptionLifecycleNotificationSpecifications( ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications) { - super.withSubscriptionLifecycleNotificationSpecifications(subscriptionLifecycleNotificationSpecifications); + this.subscriptionLifecycleNotificationSpecifications = subscriptionLifecycleNotificationSpecifications; + return this; + } + + /** + * Get the privateResourceProviderConfiguration property: The private resource provider configuration. + * + * @return the privateResourceProviderConfiguration value. + */ + public ProviderRegistrationPropertiesPrivateResourceProviderConfiguration privateResourceProviderConfiguration() { + return this.privateResourceProviderConfiguration; + } + + /** + * Set the privateResourceProviderConfiguration property: The private resource provider configuration. + * + * @param privateResourceProviderConfiguration the privateResourceProviderConfiguration value to set. + * @return the ProviderRegistrationProperties object itself. + */ + public ProviderRegistrationProperties withPrivateResourceProviderConfiguration( + ProviderRegistrationPropertiesPrivateResourceProviderConfiguration privateResourceProviderConfiguration) { + this.privateResourceProviderConfiguration = privateResourceProviderConfiguration; + return this; + } + + /** + * Get the tokenAuthConfiguration property: The token auth configuration. + * + * @return the tokenAuthConfiguration value. + */ + public TokenAuthConfiguration tokenAuthConfiguration() { + return this.tokenAuthConfiguration; + } + + /** + * Set the tokenAuthConfiguration property: The token auth configuration. + * + * @param tokenAuthConfiguration the tokenAuthConfiguration value to set. + * @return the ProviderRegistrationProperties object itself. + */ + public ProviderRegistrationProperties withTokenAuthConfiguration(TokenAuthConfiguration tokenAuthConfiguration) { + this.tokenAuthConfiguration = tokenAuthConfiguration; return this; } @@ -80,6 +172,24 @@ public ProviderRegistrationProperties withNamespace(String namespace) { return this; } + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withServices(List services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withServiceName(String serviceName) { + super.withServiceName(serviceName); + return this; + } + /** * {@inheritDoc} */ @@ -145,6 +255,16 @@ public ProviderRegistrationProperties withCapabilities(List globalNotificationEndpoints) { + super.withGlobalNotificationEndpoints(globalNotificationEndpoints); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withEnableTenantLinkedNotification(Boolean enableTenantLinkedNotification) { + super.withEnableTenantLinkedNotification(enableTenantLinkedNotification); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withNotifications(List notifications) { + super.withNotifications(notifications); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties + withLinkedNotificationRules(List linkedNotificationRules) { + super.withLinkedNotificationRules(linkedNotificationRules); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties + withResourceProviderAuthorizationRules(ResourceProviderAuthorizationRules resourceProviderAuthorizationRules) { + super.withResourceProviderAuthorizationRules(resourceProviderAuthorizationRules); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties + withDstsConfiguration(ResourceProviderManifestPropertiesDstsConfiguration dstsConfiguration) { + super.withDstsConfiguration(dstsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withNotificationOptions(NotificationOptions notificationOptions) { + super.withNotificationOptions(notificationOptions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties + withResourceHydrationAccounts(List resourceHydrationAccounts) { + super.withResourceHydrationAccounts(resourceHydrationAccounts); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties + withNotificationSettings(ResourceProviderManifestPropertiesNotificationSettings notificationSettings) { + super.withNotificationSettings(notificationSettings); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withManagementGroupGlobalNotificationEndpoints( + List managementGroupGlobalNotificationEndpoints) { + super.withManagementGroupGlobalNotificationEndpoints(managementGroupGlobalNotificationEndpoints); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withOptionalFeatures(List optionalFeatures) { + super.withOptionalFeatures(optionalFeatures); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withResourceGroupLockOptionDuringMove( + ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove) { + super.withResourceGroupLockOptionDuringMove(resourceGroupLockOptionDuringMove); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties + withResponseOptions(ResourceProviderManifestPropertiesResponseOptions responseOptions) { + super.withResponseOptions(responseOptions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withLegacyNamespace(String legacyNamespace) { + super.withLegacyNamespace(legacyNamespace); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withLegacyRegistrations(List legacyRegistrations) { + super.withLegacyRegistrations(legacyRegistrations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationProperties withCustomManifestVersion(String customManifestVersion) { + super.withCustomManifestVersion(customManifestVersion); + return this; + } + /** * Validates the instance. * @@ -171,12 +444,27 @@ public ProviderRegistrationProperties withTemplateDeploymentOptions( */ @Override public void validate() { + if (providerHubMetadata() != null) { + providerHubMetadata().validate(); + } + if (subscriptionLifecycleNotificationSpecifications() != null) { + subscriptionLifecycleNotificationSpecifications().validate(); + } + if (privateResourceProviderConfiguration() != null) { + privateResourceProviderConfiguration().validate(); + } + if (tokenAuthConfiguration() != null) { + tokenAuthConfiguration().validate(); + } if (providerAuthentication() != null) { providerAuthentication().validate(); } if (providerAuthorizations() != null) { providerAuthorizations().forEach(e -> e.validate()); } + if (services() != null) { + services().forEach(e -> e.validate()); + } if (featuresRule() != null) { featuresRule().validate(); } @@ -192,11 +480,35 @@ public void validate() { if (templateDeploymentOptions() != null) { templateDeploymentOptions().validate(); } - if (providerHubMetadata() != null) { - providerHubMetadata().validate(); + if (globalNotificationEndpoints() != null) { + globalNotificationEndpoints().forEach(e -> e.validate()); } - if (subscriptionLifecycleNotificationSpecifications() != null) { - subscriptionLifecycleNotificationSpecifications().validate(); + if (notifications() != null) { + notifications().forEach(e -> e.validate()); + } + if (linkedNotificationRules() != null) { + linkedNotificationRules().forEach(e -> e.validate()); + } + if (resourceProviderAuthorizationRules() != null) { + resourceProviderAuthorizationRules().validate(); + } + if (dstsConfiguration() != null) { + dstsConfiguration().validate(); + } + if (resourceHydrationAccounts() != null) { + resourceHydrationAccounts().forEach(e -> e.validate()); + } + if (notificationSettings() != null) { + notificationSettings().validate(); + } + if (managementGroupGlobalNotificationEndpoints() != null) { + managementGroupGlobalNotificationEndpoints().forEach(e -> e.validate()); + } + if (resourceGroupLockOptionDuringMove() != null) { + resourceGroupLockOptionDuringMove().validate(); + } + if (responseOptions() != null) { + responseOptions().validate(); } } @@ -210,6 +522,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("providerAuthorizations", providerAuthorizations(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("namespace", namespace()); + jsonWriter.writeArrayField("services", services(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("serviceName", serviceName()); jsonWriter.writeStringField("providerVersion", providerVersion()); jsonWriter.writeStringField("providerType", providerType() == null ? null : providerType().toString()); jsonWriter.writeArrayField("requiredFeatures", requiredFeatures(), @@ -218,13 +532,38 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("requestHeaderOptions", requestHeaderOptions()); jsonWriter.writeJsonField("management", management()); jsonWriter.writeArrayField("capabilities", capabilities(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("crossTenantTokenValidation", + crossTenantTokenValidation() == null ? null : crossTenantTokenValidation().toString()); jsonWriter.writeUntypedField("metadata", metadata()); jsonWriter.writeJsonField("templateDeploymentOptions", templateDeploymentOptions()); - jsonWriter.writeJsonField("providerHubMetadata", providerHubMetadata()); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); + jsonWriter.writeArrayField("globalNotificationEndpoints", globalNotificationEndpoints(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("enableTenantLinkedNotification", enableTenantLinkedNotification()); + jsonWriter.writeArrayField("notifications", notifications(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("linkedNotificationRules", linkedNotificationRules(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("resourceProviderAuthorizationRules", resourceProviderAuthorizationRules()); + jsonWriter.writeJsonField("dstsConfiguration", dstsConfiguration()); + jsonWriter.writeStringField("notificationOptions", + notificationOptions() == null ? null : notificationOptions().toString()); + jsonWriter.writeArrayField("resourceHydrationAccounts", resourceHydrationAccounts(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("notificationSettings", notificationSettings()); + jsonWriter.writeArrayField("managementGroupGlobalNotificationEndpoints", + managementGroupGlobalNotificationEndpoints(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("optionalFeatures", optionalFeatures(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("resourceGroupLockOptionDuringMove", resourceGroupLockOptionDuringMove()); + jsonWriter.writeJsonField("responseOptions", responseOptions()); + jsonWriter.writeStringField("legacyNamespace", legacyNamespace()); + jsonWriter.writeArrayField("legacyRegistrations", legacyRegistrations(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("customManifestVersion", customManifestVersion()); + jsonWriter.writeJsonField("providerHubMetadata", this.providerHubMetadata); jsonWriter.writeJsonField("subscriptionLifecycleNotificationSpecifications", - subscriptionLifecycleNotificationSpecifications()); + this.subscriptionLifecycleNotificationSpecifications); + jsonWriter.writeJsonField("privateResourceProviderConfiguration", this.privateResourceProviderConfiguration); + jsonWriter.writeJsonField("tokenAuthConfiguration", this.tokenAuthConfiguration); return jsonWriter.writeEndObject(); } @@ -253,6 +592,12 @@ public static ProviderRegistrationProperties fromJson(JsonReader jsonReader) thr deserializedProviderRegistrationProperties.withProviderAuthorizations(providerAuthorizations); } else if ("namespace".equals(fieldName)) { deserializedProviderRegistrationProperties.withNamespace(reader.getString()); + } else if ("services".equals(fieldName)) { + List services + = reader.readArray(reader1 -> ResourceProviderService.fromJson(reader1)); + deserializedProviderRegistrationProperties.withServices(services); + } else if ("serviceName".equals(fieldName)) { + deserializedProviderRegistrationProperties.withServiceName(reader.getString()); } else if ("providerVersion".equals(fieldName)) { deserializedProviderRegistrationProperties.withProviderVersion(reader.getString()); } else if ("providerType".equals(fieldName)) { @@ -274,20 +619,82 @@ public static ProviderRegistrationProperties fromJson(JsonReader jsonReader) thr List capabilities = reader.readArray(reader1 -> ResourceProviderCapabilities.fromJson(reader1)); deserializedProviderRegistrationProperties.withCapabilities(capabilities); + } else if ("crossTenantTokenValidation".equals(fieldName)) { + deserializedProviderRegistrationProperties + .withCrossTenantTokenValidation(CrossTenantTokenValidation.fromString(reader.getString())); } else if ("metadata".equals(fieldName)) { deserializedProviderRegistrationProperties.withMetadata(reader.readUntyped()); } else if ("templateDeploymentOptions".equals(fieldName)) { deserializedProviderRegistrationProperties.withTemplateDeploymentOptions( ResourceProviderManifestPropertiesTemplateDeploymentOptions.fromJson(reader)); - } else if ("providerHubMetadata".equals(fieldName)) { + } else if ("globalNotificationEndpoints".equals(fieldName)) { + List globalNotificationEndpoints + = reader.readArray(reader1 -> ResourceProviderEndpoint.fromJson(reader1)); deserializedProviderRegistrationProperties - .withProviderHubMetadata(ProviderRegistrationPropertiesProviderHubMetadata.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { + .withGlobalNotificationEndpoints(globalNotificationEndpoints); + } else if ("enableTenantLinkedNotification".equals(fieldName)) { deserializedProviderRegistrationProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); + .withEnableTenantLinkedNotification(reader.getNullable(JsonReader::getBoolean)); + } else if ("notifications".equals(fieldName)) { + List notifications = reader.readArray(reader1 -> Notification.fromJson(reader1)); + deserializedProviderRegistrationProperties.withNotifications(notifications); + } else if ("linkedNotificationRules".equals(fieldName)) { + List linkedNotificationRules + = reader.readArray(reader1 -> FanoutLinkedNotificationRule.fromJson(reader1)); + deserializedProviderRegistrationProperties.withLinkedNotificationRules(linkedNotificationRules); + } else if ("resourceProviderAuthorizationRules".equals(fieldName)) { + deserializedProviderRegistrationProperties + .withResourceProviderAuthorizationRules(ResourceProviderAuthorizationRules.fromJson(reader)); + } else if ("dstsConfiguration".equals(fieldName)) { + deserializedProviderRegistrationProperties + .withDstsConfiguration(ResourceProviderManifestPropertiesDstsConfiguration.fromJson(reader)); + } else if ("notificationOptions".equals(fieldName)) { + deserializedProviderRegistrationProperties + .withNotificationOptions(NotificationOptions.fromString(reader.getString())); + } else if ("resourceHydrationAccounts".equals(fieldName)) { + List resourceHydrationAccounts + = reader.readArray(reader1 -> ResourceHydrationAccount.fromJson(reader1)); + deserializedProviderRegistrationProperties.withResourceHydrationAccounts(resourceHydrationAccounts); + } else if ("notificationSettings".equals(fieldName)) { + deserializedProviderRegistrationProperties.withNotificationSettings( + ResourceProviderManifestPropertiesNotificationSettings.fromJson(reader)); + } else if ("managementGroupGlobalNotificationEndpoints".equals(fieldName)) { + List managementGroupGlobalNotificationEndpoints + = reader.readArray(reader1 -> ResourceProviderEndpoint.fromJson(reader1)); + deserializedProviderRegistrationProperties + .withManagementGroupGlobalNotificationEndpoints(managementGroupGlobalNotificationEndpoints); + } else if ("optionalFeatures".equals(fieldName)) { + List optionalFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedProviderRegistrationProperties.withOptionalFeatures(optionalFeatures); + } else if ("resourceGroupLockOptionDuringMove".equals(fieldName)) { + deserializedProviderRegistrationProperties.withResourceGroupLockOptionDuringMove( + ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.fromJson(reader)); + } else if ("responseOptions".equals(fieldName)) { + deserializedProviderRegistrationProperties + .withResponseOptions(ResourceProviderManifestPropertiesResponseOptions.fromJson(reader)); + } else if ("legacyNamespace".equals(fieldName)) { + deserializedProviderRegistrationProperties.withLegacyNamespace(reader.getString()); + } else if ("legacyRegistrations".equals(fieldName)) { + List legacyRegistrations = reader.readArray(reader1 -> reader1.getString()); + deserializedProviderRegistrationProperties.withLegacyRegistrations(legacyRegistrations); + } else if ("customManifestVersion".equals(fieldName)) { + deserializedProviderRegistrationProperties.withCustomManifestVersion(reader.getString()); + } else if ("providerHubMetadata".equals(fieldName)) { + deserializedProviderRegistrationProperties.providerHubMetadata + = ProviderRegistrationPropertiesProviderHubMetadata.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedProviderRegistrationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else if ("subscriptionLifecycleNotificationSpecifications".equals(fieldName)) { - deserializedProviderRegistrationProperties.withSubscriptionLifecycleNotificationSpecifications( - ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.fromJson(reader)); + deserializedProviderRegistrationProperties.subscriptionLifecycleNotificationSpecifications + = ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + .fromJson(reader); + } else if ("privateResourceProviderConfiguration".equals(fieldName)) { + deserializedProviderRegistrationProperties.privateResourceProviderConfiguration + = ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.fromJson(reader); + } else if ("tokenAuthConfiguration".equals(fieldName)) { + deserializedProviderRegistrationProperties.tokenAuthConfiguration + = TokenAuthConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesAutoGenerated.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesAutoGenerated.java deleted file mode 100644 index 979003a849d8..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesAutoGenerated.java +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ProviderRegistrationPropertiesAutoGenerated model. - */ -@Fluent -public class ProviderRegistrationPropertiesAutoGenerated extends ResourceProviderManifestProperties { - /* - * The providerHubMetadata property. - */ - private ProviderRegistrationPropertiesProviderHubMetadata providerHubMetadata; - - /* - * The provisioningState property. - */ - private ProvisioningState provisioningState; - - /* - * The subscriptionLifecycleNotificationSpecifications property. - */ - private ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications; - - /** - * Creates an instance of ProviderRegistrationPropertiesAutoGenerated class. - */ - public ProviderRegistrationPropertiesAutoGenerated() { - } - - /** - * Get the providerHubMetadata property: The providerHubMetadata property. - * - * @return the providerHubMetadata value. - */ - public ProviderRegistrationPropertiesProviderHubMetadata providerHubMetadata() { - return this.providerHubMetadata; - } - - /** - * Set the providerHubMetadata property: The providerHubMetadata property. - * - * @param providerHubMetadata the providerHubMetadata value to set. - * @return the ProviderRegistrationPropertiesAutoGenerated object itself. - */ - public ProviderRegistrationPropertiesAutoGenerated - withProviderHubMetadata(ProviderRegistrationPropertiesProviderHubMetadata providerHubMetadata) { - this.providerHubMetadata = providerHubMetadata; - return this; - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The provisioningState property. - * - * @param provisioningState the provisioningState value to set. - * @return the ProviderRegistrationPropertiesAutoGenerated object itself. - */ - public ProviderRegistrationPropertiesAutoGenerated withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the subscriptionLifecycleNotificationSpecifications property: The - * subscriptionLifecycleNotificationSpecifications property. - * - * @return the subscriptionLifecycleNotificationSpecifications value. - */ - public ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications - subscriptionLifecycleNotificationSpecifications() { - return this.subscriptionLifecycleNotificationSpecifications; - } - - /** - * Set the subscriptionLifecycleNotificationSpecifications property: The - * subscriptionLifecycleNotificationSpecifications property. - * - * @param subscriptionLifecycleNotificationSpecifications the subscriptionLifecycleNotificationSpecifications value - * to set. - * @return the ProviderRegistrationPropertiesAutoGenerated object itself. - */ - public ProviderRegistrationPropertiesAutoGenerated withSubscriptionLifecycleNotificationSpecifications( - ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications) { - this.subscriptionLifecycleNotificationSpecifications = subscriptionLifecycleNotificationSpecifications; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated - withProviderAuthentication(ResourceProviderManifestPropertiesProviderAuthentication providerAuthentication) { - super.withProviderAuthentication(providerAuthentication); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated - withProviderAuthorizations(List providerAuthorizations) { - super.withProviderAuthorizations(providerAuthorizations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated withNamespace(String namespace) { - super.withNamespace(namespace); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated withProviderVersion(String providerVersion) { - super.withProviderVersion(providerVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated withProviderType(ResourceProviderType providerType) { - super.withProviderType(providerType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated withRequiredFeatures(List requiredFeatures) { - super.withRequiredFeatures(requiredFeatures); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated - withFeaturesRule(ResourceProviderManifestPropertiesFeaturesRule featuresRule) { - super.withFeaturesRule(featuresRule); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated - withRequestHeaderOptions(ResourceProviderManifestPropertiesRequestHeaderOptions requestHeaderOptions) { - super.withRequestHeaderOptions(requestHeaderOptions); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated - withManagement(ResourceProviderManifestPropertiesManagement management) { - super.withManagement(management); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated - withCapabilities(List capabilities) { - super.withCapabilities(capabilities); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated withMetadata(Object metadata) { - super.withMetadata(metadata); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProviderRegistrationPropertiesAutoGenerated withTemplateDeploymentOptions( - ResourceProviderManifestPropertiesTemplateDeploymentOptions templateDeploymentOptions) { - super.withTemplateDeploymentOptions(templateDeploymentOptions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (providerHubMetadata() != null) { - providerHubMetadata().validate(); - } - if (subscriptionLifecycleNotificationSpecifications() != null) { - subscriptionLifecycleNotificationSpecifications().validate(); - } - if (providerAuthentication() != null) { - providerAuthentication().validate(); - } - if (providerAuthorizations() != null) { - providerAuthorizations().forEach(e -> e.validate()); - } - if (featuresRule() != null) { - featuresRule().validate(); - } - if (requestHeaderOptions() != null) { - requestHeaderOptions().validate(); - } - if (management() != null) { - management().validate(); - } - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - if (templateDeploymentOptions() != null) { - templateDeploymentOptions().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("providerAuthentication", providerAuthentication()); - jsonWriter.writeArrayField("providerAuthorizations", providerAuthorizations(), - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("namespace", namespace()); - jsonWriter.writeStringField("providerVersion", providerVersion()); - jsonWriter.writeStringField("providerType", providerType() == null ? null : providerType().toString()); - jsonWriter.writeArrayField("requiredFeatures", requiredFeatures(), - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("featuresRule", featuresRule()); - jsonWriter.writeJsonField("requestHeaderOptions", requestHeaderOptions()); - jsonWriter.writeJsonField("management", management()); - jsonWriter.writeArrayField("capabilities", capabilities(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeUntypedField("metadata", metadata()); - jsonWriter.writeJsonField("templateDeploymentOptions", templateDeploymentOptions()); - jsonWriter.writeJsonField("providerHubMetadata", this.providerHubMetadata); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - jsonWriter.writeJsonField("subscriptionLifecycleNotificationSpecifications", - this.subscriptionLifecycleNotificationSpecifications); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProviderRegistrationPropertiesAutoGenerated from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProviderRegistrationPropertiesAutoGenerated 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 ProviderRegistrationPropertiesAutoGenerated. - */ - public static ProviderRegistrationPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ProviderRegistrationPropertiesAutoGenerated deserializedProviderRegistrationPropertiesAutoGenerated - = new ProviderRegistrationPropertiesAutoGenerated(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerAuthentication".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.withProviderAuthentication( - ResourceProviderManifestPropertiesProviderAuthentication.fromJson(reader)); - } else if ("providerAuthorizations".equals(fieldName)) { - List providerAuthorizations - = reader.readArray(reader1 -> ResourceProviderAuthorization.fromJson(reader1)); - deserializedProviderRegistrationPropertiesAutoGenerated - .withProviderAuthorizations(providerAuthorizations); - } else if ("namespace".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.withNamespace(reader.getString()); - } else if ("providerVersion".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.withProviderVersion(reader.getString()); - } else if ("providerType".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated - .withProviderType(ResourceProviderType.fromString(reader.getString())); - } else if ("requiredFeatures".equals(fieldName)) { - List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); - deserializedProviderRegistrationPropertiesAutoGenerated.withRequiredFeatures(requiredFeatures); - } else if ("featuresRule".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated - .withFeaturesRule(ResourceProviderManifestPropertiesFeaturesRule.fromJson(reader)); - } else if ("requestHeaderOptions".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.withRequestHeaderOptions( - ResourceProviderManifestPropertiesRequestHeaderOptions.fromJson(reader)); - } else if ("management".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated - .withManagement(ResourceProviderManifestPropertiesManagement.fromJson(reader)); - } else if ("capabilities".equals(fieldName)) { - List capabilities - = reader.readArray(reader1 -> ResourceProviderCapabilities.fromJson(reader1)); - deserializedProviderRegistrationPropertiesAutoGenerated.withCapabilities(capabilities); - } else if ("metadata".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.withMetadata(reader.readUntyped()); - } else if ("templateDeploymentOptions".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.withTemplateDeploymentOptions( - ResourceProviderManifestPropertiesTemplateDeploymentOptions.fromJson(reader)); - } else if ("providerHubMetadata".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.providerHubMetadata - = ProviderRegistrationPropertiesProviderHubMetadata.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("subscriptionLifecycleNotificationSpecifications".equals(fieldName)) { - deserializedProviderRegistrationPropertiesAutoGenerated.subscriptionLifecycleNotificationSpecifications - = ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications - .fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedProviderRegistrationPropertiesAutoGenerated; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.java new file mode 100644 index 000000000000..fae018bac0c8 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesPrivateResourceProviderConfiguration.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The private resource provider configuration. + */ +@Fluent +public final class ProviderRegistrationPropertiesPrivateResourceProviderConfiguration + extends PrivateResourceProviderConfiguration { + /** + * Creates an instance of ProviderRegistrationPropertiesPrivateResourceProviderConfiguration class. + */ + public ProviderRegistrationPropertiesPrivateResourceProviderConfiguration() { + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationPropertiesPrivateResourceProviderConfiguration + withAllowedSubscriptions(List allowedSubscriptions) { + super.withAllowedSubscriptions(allowedSubscriptions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("allowedSubscriptions", allowedSubscriptions(), + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProviderRegistrationPropertiesPrivateResourceProviderConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProviderRegistrationPropertiesPrivateResourceProviderConfiguration 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 + * ProviderRegistrationPropertiesPrivateResourceProviderConfiguration. + */ + public static ProviderRegistrationPropertiesPrivateResourceProviderConfiguration fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ProviderRegistrationPropertiesPrivateResourceProviderConfiguration deserializedProviderRegistrationPropertiesPrivateResourceProviderConfiguration + = new ProviderRegistrationPropertiesPrivateResourceProviderConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowedSubscriptions".equals(fieldName)) { + List allowedSubscriptions = reader.readArray(reader1 -> reader1.getString()); + deserializedProviderRegistrationPropertiesPrivateResourceProviderConfiguration + .withAllowedSubscriptions(allowedSubscriptions); + } else { + reader.skipChildren(); + } + } + + return deserializedProviderRegistrationPropertiesPrivateResourceProviderConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesProviderHubMetadata.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesProviderHubMetadata.java index 8d8fa6841921..7d33b8cd5c25 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesProviderHubMetadata.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesProviderHubMetadata.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ProviderRegistrationPropertiesProviderHubMetadata model. + * The provider hub metadata. */ @Fluent public final class ProviderRegistrationPropertiesProviderHubMetadata extends ProviderHubMetadata { @@ -52,6 +52,36 @@ public ProviderRegistrationPropertiesProviderHubMetadata withThirdPartyProviderA return this; } + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationPropertiesProviderHubMetadata + withDirectRpRoleDefinitionId(String directRpRoleDefinitionId) { + super.withDirectRpRoleDefinitionId(directRpRoleDefinitionId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationPropertiesProviderHubMetadata + withRegionalAsyncOperationResourceTypeName(String regionalAsyncOperationResourceTypeName) { + super.withRegionalAsyncOperationResourceTypeName(regionalAsyncOperationResourceTypeName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ProviderRegistrationPropertiesProviderHubMetadata + withGlobalAsyncOperationResourceTypeName(String globalAsyncOperationResourceTypeName) { + super.withGlobalAsyncOperationResourceTypeName(globalAsyncOperationResourceTypeName); + return this; + } + /** * Validates the instance. * @@ -80,6 +110,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("providerAuthentication", providerAuthentication()); jsonWriter.writeJsonField("thirdPartyProviderAuthorization", thirdPartyProviderAuthorization()); + jsonWriter.writeStringField("directRpRoleDefinitionId", directRpRoleDefinitionId()); + jsonWriter.writeStringField("regionalAsyncOperationResourceTypeName", regionalAsyncOperationResourceTypeName()); + jsonWriter.writeStringField("globalAsyncOperationResourceTypeName", globalAsyncOperationResourceTypeName()); return jsonWriter.writeEndObject(); } @@ -110,6 +143,15 @@ public static ProviderRegistrationPropertiesProviderHubMetadata fromJson(JsonRea } else if ("thirdPartyProviderAuthorization".equals(fieldName)) { deserializedProviderRegistrationPropertiesProviderHubMetadata.withThirdPartyProviderAuthorization( ProviderHubMetadataThirdPartyProviderAuthorization.fromJson(reader)); + } else if ("directRpRoleDefinitionId".equals(fieldName)) { + deserializedProviderRegistrationPropertiesProviderHubMetadata + .withDirectRpRoleDefinitionId(reader.getString()); + } else if ("regionalAsyncOperationResourceTypeName".equals(fieldName)) { + deserializedProviderRegistrationPropertiesProviderHubMetadata + .withRegionalAsyncOperationResourceTypeName(reader.getString()); + } else if ("globalAsyncOperationResourceTypeName".equals(fieldName)) { + deserializedProviderRegistrationPropertiesProviderHubMetadata + .withGlobalAsyncOperationResourceTypeName(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java index d676fb95674e..b902b219f837 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java @@ -14,7 +14,7 @@ import java.util.List; /** - * The ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications model. + * The subscription lifecycle notification specifications. */ @Fluent public final class ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaPolicy.java new file mode 100644 index 000000000000..fc74b3dcf814 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaPolicy.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for QuotaPolicy. + */ +public final class QuotaPolicy extends ExpandableStringEnum { + /** + * Static value Default for QuotaPolicy. + */ + public static final QuotaPolicy DEFAULT = fromString("Default"); + + /** + * Static value None for QuotaPolicy. + */ + public static final QuotaPolicy NONE = fromString("None"); + + /** + * Static value Restricted for QuotaPolicy. + */ + public static final QuotaPolicy RESTRICTED = fromString("Restricted"); + + /** + * Creates a new instance of QuotaPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public QuotaPolicy() { + } + + /** + * Creates or finds a QuotaPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding QuotaPolicy. + */ + public static QuotaPolicy fromString(String name) { + return fromString(name, QuotaPolicy.class); + } + + /** + * Gets known QuotaPolicy values. + * + * @return known QuotaPolicy values. + */ + public static Collection values() { + return values(QuotaPolicy.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaRule.java new file mode 100644 index 000000000000..4c695ca9a756 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/QuotaRule.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The QuotaRule model. + */ +@Fluent +public final class QuotaRule implements JsonSerializable { + /* + * The quota policy. + */ + private QuotaPolicy quotaPolicy; + + /* + * The location rules. + */ + private List locationRules; + + /* + * The required features. + */ + private List requiredFeatures; + + /** + * Creates an instance of QuotaRule class. + */ + public QuotaRule() { + } + + /** + * Get the quotaPolicy property: The quota policy. + * + * @return the quotaPolicy value. + */ + public QuotaPolicy quotaPolicy() { + return this.quotaPolicy; + } + + /** + * Set the quotaPolicy property: The quota policy. + * + * @param quotaPolicy the quotaPolicy value to set. + * @return the QuotaRule object itself. + */ + public QuotaRule withQuotaPolicy(QuotaPolicy quotaPolicy) { + this.quotaPolicy = quotaPolicy; + return this; + } + + /** + * Get the locationRules property: The location rules. + * + * @return the locationRules value. + */ + public List locationRules() { + return this.locationRules; + } + + /** + * Set the locationRules property: The location rules. + * + * @param locationRules the locationRules value to set. + * @return the QuotaRule object itself. + */ + public QuotaRule withLocationRules(List locationRules) { + this.locationRules = locationRules; + return this; + } + + /** + * Get the requiredFeatures property: The required features. + * + * @return the requiredFeatures value. + */ + public List requiredFeatures() { + return this.requiredFeatures; + } + + /** + * Set the requiredFeatures property: The required features. + * + * @param requiredFeatures the requiredFeatures value to set. + * @return the QuotaRule object itself. + */ + public QuotaRule withRequiredFeatures(List requiredFeatures) { + this.requiredFeatures = requiredFeatures; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (locationRules() != null) { + locationRules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("quotaPolicy", this.quotaPolicy == null ? null : this.quotaPolicy.toString()); + jsonWriter.writeArrayField("locationRules", this.locationRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QuotaRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QuotaRule 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 QuotaRule. + */ + public static QuotaRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QuotaRule deserializedQuotaRule = new QuotaRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("quotaPolicy".equals(fieldName)) { + deserializedQuotaRule.quotaPolicy = QuotaPolicy.fromString(reader.getString()); + } else if ("locationRules".equals(fieldName)) { + List locationRules + = reader.readArray(reader1 -> LocationQuotaRule.fromJson(reader1)); + deserializedQuotaRule.locationRules = locationRules; + } else if ("requiredFeatures".equals(fieldName)) { + List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedQuotaRule.requiredFeatures = requiredFeatures; + } else { + reader.skipChildren(); + } + } + + return deserializedQuotaRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ReRegisterSubscriptionMetadata.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ReRegisterSubscriptionMetadata.java index 112138411039..bdc58b3d602b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ReRegisterSubscriptionMetadata.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ReRegisterSubscriptionMetadata.java @@ -17,12 +17,12 @@ @Fluent public class ReRegisterSubscriptionMetadata implements JsonSerializable { /* - * The enabled property. + * Whether it's enabled or not. */ private boolean enabled; /* - * The concurrencyLimit property. + * The concurrency limit. */ private Integer concurrencyLimit; @@ -33,7 +33,7 @@ public ReRegisterSubscriptionMetadata() { } /** - * Get the enabled property: The enabled property. + * Get the enabled property: Whether it's enabled or not. * * @return the enabled value. */ @@ -42,7 +42,7 @@ public boolean enabled() { } /** - * Set the enabled property: The enabled property. + * Set the enabled property: Whether it's enabled or not. * * @param enabled the enabled value to set. * @return the ReRegisterSubscriptionMetadata object itself. @@ -53,7 +53,7 @@ public ReRegisterSubscriptionMetadata withEnabled(boolean enabled) { } /** - * Get the concurrencyLimit property: The concurrencyLimit property. + * Get the concurrencyLimit property: The concurrency limit. * * @return the concurrencyLimit value. */ @@ -62,7 +62,7 @@ public Integer concurrencyLimit() { } /** - * Set the concurrencyLimit property: The concurrencyLimit property. + * Set the concurrencyLimit property: The concurrency limit. * * @param concurrencyLimit the concurrencyLimit value to set. * @return the ReRegisterSubscriptionMetadata object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Readiness.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Readiness.java new file mode 100644 index 000000000000..4caf1ae20192 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Readiness.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The readiness. + */ +public final class Readiness extends ExpandableStringEnum { + /** + * Static value ClosingDown for Readiness. + */ + public static final Readiness CLOSING_DOWN = fromString("ClosingDown"); + + /** + * Static value Deprecated for Readiness. + */ + public static final Readiness DEPRECATED = fromString("Deprecated"); + + /** + * Static value GA for Readiness. + */ + public static final Readiness GA = fromString("GA"); + + /** + * Static value InDevelopment for Readiness. + */ + public static final Readiness IN_DEVELOPMENT = fromString("InDevelopment"); + + /** + * Static value InternalOnly for Readiness. + */ + public static final Readiness INTERNAL_ONLY = fromString("InternalOnly"); + + /** + * Static value PrivatePreview for Readiness. + */ + public static final Readiness PRIVATE_PREVIEW = fromString("PrivatePreview"); + + /** + * Static value PublicPreview for Readiness. + */ + public static final Readiness PUBLIC_PREVIEW = fromString("PublicPreview"); + + /** + * Static value RemovedFromARM for Readiness. + */ + public static final Readiness REMOVED_FROM_ARM = fromString("RemovedFromARM"); + + /** + * Static value Retired for Readiness. + */ + public static final Readiness RETIRED = fromString("Retired"); + + /** + * Creates a new instance of Readiness value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Readiness() { + } + + /** + * Creates or finds a Readiness from its string representation. + * + * @param name a name to look for. + * @return the corresponding Readiness. + */ + public static Readiness fromString(String name) { + return fromString(name, Readiness.class); + } + + /** + * Gets known Readiness values. + * + * @return known Readiness values. + */ + public static Collection values() { + return values(Readiness.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Regionality.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Regionality.java index f8844d96a60f..24c11bfc0ccb 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Regionality.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Regionality.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for Regionality. + * The regionality. */ public final class Regionality extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RequestHeaderOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RequestHeaderOptions.java index 5c9082f9dc6d..1c06f84e4ecf 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RequestHeaderOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RequestHeaderOptions.java @@ -17,10 +17,15 @@ @Fluent public class RequestHeaderOptions implements JsonSerializable { /* - * The optInHeaders property. + * The opt in headers. */ private OptInHeaderType optInHeaders; + /* + * The opt out headers. + */ + private OptOutHeaderType optOutHeaders; + /** * Creates an instance of RequestHeaderOptions class. */ @@ -28,7 +33,7 @@ public RequestHeaderOptions() { } /** - * Get the optInHeaders property: The optInHeaders property. + * Get the optInHeaders property: The opt in headers. * * @return the optInHeaders value. */ @@ -37,7 +42,7 @@ public OptInHeaderType optInHeaders() { } /** - * Set the optInHeaders property: The optInHeaders property. + * Set the optInHeaders property: The opt in headers. * * @param optInHeaders the optInHeaders value to set. * @return the RequestHeaderOptions object itself. @@ -47,6 +52,26 @@ public RequestHeaderOptions withOptInHeaders(OptInHeaderType optInHeaders) { return this; } + /** + * Get the optOutHeaders property: The opt out headers. + * + * @return the optOutHeaders value. + */ + public OptOutHeaderType optOutHeaders() { + return this.optOutHeaders; + } + + /** + * Set the optOutHeaders property: The opt out headers. + * + * @param optOutHeaders the optOutHeaders value to set. + * @return the RequestHeaderOptions object itself. + */ + public RequestHeaderOptions withOptOutHeaders(OptOutHeaderType optOutHeaders) { + this.optOutHeaders = optOutHeaders; + return this; + } + /** * Validates the instance. * @@ -62,6 +87,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("optInHeaders", this.optInHeaders == null ? null : this.optInHeaders.toString()); + jsonWriter.writeStringField("optOutHeaders", this.optOutHeaders == null ? null : this.optOutHeaders.toString()); return jsonWriter.writeEndObject(); } @@ -82,6 +108,8 @@ public static RequestHeaderOptions fromJson(JsonReader jsonReader) throws IOExce if ("optInHeaders".equals(fieldName)) { deserializedRequestHeaderOptions.optInHeaders = OptInHeaderType.fromString(reader.getString()); + } else if ("optOutHeaders".equals(fieldName)) { + deserializedRequestHeaderOptions.optOutHeaders = OptOutHeaderType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessPolicy.java index 4ba9b193b4cf..649db535ffa9 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessPolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessPolicy.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.providerhub.models; /** - * Defines values for ResourceAccessPolicy. + * The resource access policy. */ public enum ResourceAccessPolicy { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessRole.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessRole.java new file mode 100644 index 000000000000..1895d55073c0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceAccessRole.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ResourceAccessRole model. + */ +@Fluent +public final class ResourceAccessRole implements JsonSerializable { + /* + * The allowed group claims. + */ + private List allowedGroupClaims; + + /* + * The actions. + */ + private List actions; + + /** + * Creates an instance of ResourceAccessRole class. + */ + public ResourceAccessRole() { + } + + /** + * Get the allowedGroupClaims property: The allowed group claims. + * + * @return the allowedGroupClaims value. + */ + public List allowedGroupClaims() { + return this.allowedGroupClaims; + } + + /** + * Set the allowedGroupClaims property: The allowed group claims. + * + * @param allowedGroupClaims the allowedGroupClaims value to set. + * @return the ResourceAccessRole object itself. + */ + public ResourceAccessRole withAllowedGroupClaims(List allowedGroupClaims) { + this.allowedGroupClaims = allowedGroupClaims; + return this; + } + + /** + * Get the actions property: The actions. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: The actions. + * + * @param actions the actions value to set. + * @return the ResourceAccessRole object itself. + */ + public ResourceAccessRole withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("allowedGroupClaims", this.allowedGroupClaims, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("actions", this.actions, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceAccessRole from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceAccessRole 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 ResourceAccessRole. + */ + public static ResourceAccessRole fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceAccessRole deserializedResourceAccessRole = new ResourceAccessRole(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowedGroupClaims".equals(fieldName)) { + List allowedGroupClaims = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceAccessRole.allowedGroupClaims = allowedGroupClaims; + } else if ("actions".equals(fieldName)) { + List actions = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceAccessRole.actions = actions; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceAccessRole; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceActions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceActions.java new file mode 100644 index 000000000000..6242a6ab1534 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceActions.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.Context; + +/** + * Resource collection API of ResourceActions. + */ +public interface ResourceActions { + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteResources(String providerNamespace, String resourceActionName, ResourceManagementAction properties); + + /** + * Deletes resources. + * + * @param providerNamespace The name of the resource provider hosted within ProviderHub. + * @param resourceActionName The resource action name. + * @param properties The properties supplied to the DeleteResources operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteResources(String providerNamespace, String resourceActionName, ResourceManagementAction properties, + Context context); +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceConcurrencyControlOption.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceConcurrencyControlOption.java new file mode 100644 index 000000000000..1cae8f908a4f --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceConcurrencyControlOption.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ResourceConcurrencyControlOption model. + */ +@Fluent +public final class ResourceConcurrencyControlOption implements JsonSerializable { + /* + * The policy. + */ + private Policy policy; + + /** + * Creates an instance of ResourceConcurrencyControlOption class. + */ + public ResourceConcurrencyControlOption() { + } + + /** + * Get the policy property: The policy. + * + * @return the policy value. + */ + public Policy policy() { + return this.policy; + } + + /** + * Set the policy property: The policy. + * + * @param policy the policy value to set. + * @return the ResourceConcurrencyControlOption object itself. + */ + public ResourceConcurrencyControlOption withPolicy(Policy policy) { + this.policy = policy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("policy", this.policy == null ? null : this.policy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceConcurrencyControlOption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceConcurrencyControlOption 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 ResourceConcurrencyControlOption. + */ + public static ResourceConcurrencyControlOption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceConcurrencyControlOption deserializedResourceConcurrencyControlOption + = new ResourceConcurrencyControlOption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("policy".equals(fieldName)) { + deserializedResourceConcurrencyControlOption.policy = Policy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceConcurrencyControlOption; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceDeletionPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceDeletionPolicy.java index 28e170edcaec..2718f563259b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceDeletionPolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceDeletionPolicy.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ResourceDeletionPolicy. + * The resource deletion policy. */ public final class ResourceDeletionPolicy extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceGraphConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceGraphConfiguration.java new file mode 100644 index 000000000000..4f30c1bb2544 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceGraphConfiguration.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ResourceGraphConfiguration model. + */ +@Fluent +public class ResourceGraphConfiguration implements JsonSerializable { + /* + * Whether it's enabled. + */ + private Boolean enabled; + + /* + * The api version. + */ + private String apiVersion; + + /** + * Creates an instance of ResourceGraphConfiguration class. + */ + public ResourceGraphConfiguration() { + } + + /** + * Get the enabled property: Whether it's enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether it's enabled. + * + * @param enabled the enabled value to set. + * @return the ResourceGraphConfiguration object itself. + */ + public ResourceGraphConfiguration withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the apiVersion property: The api version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Set the apiVersion property: The api version. + * + * @param apiVersion the apiVersion value to set. + * @return the ResourceGraphConfiguration object itself. + */ + public ResourceGraphConfiguration withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("apiVersion", this.apiVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceGraphConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceGraphConfiguration 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 ResourceGraphConfiguration. + */ + public static ResourceGraphConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceGraphConfiguration deserializedResourceGraphConfiguration = new ResourceGraphConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedResourceGraphConfiguration.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("apiVersion".equals(fieldName)) { + deserializedResourceGraphConfiguration.apiVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceGraphConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceHydrationAccount.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceHydrationAccount.java new file mode 100644 index 000000000000..c9fdd82a9e3b --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceHydrationAccount.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ResourceHydrationAccount model. + */ +@Fluent +public final class ResourceHydrationAccount implements JsonSerializable { + /* + * The max child resource consistency job limit. + */ + private Long maxChildResourceConsistencyJobLimit; + + /* + * The encrypted key. + */ + private String encryptedKey; + + /* + * The account name. + */ + private String accountName; + + /* + * The subscription id. + */ + private String subscriptionId; + + /** + * Creates an instance of ResourceHydrationAccount class. + */ + public ResourceHydrationAccount() { + } + + /** + * Get the maxChildResourceConsistencyJobLimit property: The max child resource consistency job limit. + * + * @return the maxChildResourceConsistencyJobLimit value. + */ + public Long maxChildResourceConsistencyJobLimit() { + return this.maxChildResourceConsistencyJobLimit; + } + + /** + * Set the maxChildResourceConsistencyJobLimit property: The max child resource consistency job limit. + * + * @param maxChildResourceConsistencyJobLimit the maxChildResourceConsistencyJobLimit value to set. + * @return the ResourceHydrationAccount object itself. + */ + public ResourceHydrationAccount withMaxChildResourceConsistencyJobLimit(Long maxChildResourceConsistencyJobLimit) { + this.maxChildResourceConsistencyJobLimit = maxChildResourceConsistencyJobLimit; + return this; + } + + /** + * Get the encryptedKey property: The encrypted key. + * + * @return the encryptedKey value. + */ + public String encryptedKey() { + return this.encryptedKey; + } + + /** + * Set the encryptedKey property: The encrypted key. + * + * @param encryptedKey the encryptedKey value to set. + * @return the ResourceHydrationAccount object itself. + */ + public ResourceHydrationAccount withEncryptedKey(String encryptedKey) { + this.encryptedKey = encryptedKey; + return this; + } + + /** + * Get the accountName property: The account name. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: The account name. + * + * @param accountName the accountName value to set. + * @return the ResourceHydrationAccount object itself. + */ + public ResourceHydrationAccount withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the subscriptionId property: The subscription id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the ResourceHydrationAccount object itself. + */ + public ResourceHydrationAccount withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maxChildResourceConsistencyJobLimit", this.maxChildResourceConsistencyJobLimit); + jsonWriter.writeStringField("encryptedKey", this.encryptedKey); + jsonWriter.writeStringField("accountName", this.accountName); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceHydrationAccount from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceHydrationAccount 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 ResourceHydrationAccount. + */ + public static ResourceHydrationAccount fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceHydrationAccount deserializedResourceHydrationAccount = new ResourceHydrationAccount(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxChildResourceConsistencyJobLimit".equals(fieldName)) { + deserializedResourceHydrationAccount.maxChildResourceConsistencyJobLimit + = reader.getNullable(JsonReader::getLong); + } else if ("encryptedKey".equals(fieldName)) { + deserializedResourceHydrationAccount.encryptedKey = reader.getString(); + } else if ("accountName".equals(fieldName)) { + deserializedResourceHydrationAccount.accountName = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedResourceHydrationAccount.subscriptionId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceHydrationAccount; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementAction.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementAction.java new file mode 100644 index 000000000000..f2d7bbc2a8f4 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementAction.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ResourceManagementAction model. + */ +@Fluent +public final class ResourceManagementAction implements JsonSerializable { + /* + * resource management action content. + */ + private List resources; + + /** + * Creates an instance of ResourceManagementAction class. + */ + public ResourceManagementAction() { + } + + /** + * Get the resources property: resource management action content. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Set the resources property: resource management action content. + * + * @param resources the resources value to set. + * @return the ResourceManagementAction object itself. + */ + public ResourceManagementAction withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resources() != null) { + resources().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("resources", this.resources, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceManagementAction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceManagementAction 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 ResourceManagementAction. + */ + public static ResourceManagementAction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceManagementAction deserializedResourceManagementAction = new ResourceManagementAction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resources".equals(fieldName)) { + List resources + = reader.readArray(reader1 -> ResourceManagementEntity.fromJson(reader1)); + deserializedResourceManagementAction.resources = resources; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceManagementAction; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementEntity.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementEntity.java new file mode 100644 index 000000000000..7dbe5faff887 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceManagementEntity.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ResourceManagementEntity model. + */ +@Fluent +public final class ResourceManagementEntity implements JsonSerializable { + /* + * The resource id. + */ + private String resourceId; + + /* + * The home tenant id. + */ + private String homeTenantId; + + /* + * The location. + */ + private String location; + + /* + * The operation status. + */ + private String status; + + /** + * Creates an instance of ResourceManagementEntity class. + */ + public ResourceManagementEntity() { + } + + /** + * Get the resourceId property: The resource id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resource id. + * + * @param resourceId the resourceId value to set. + * @return the ResourceManagementEntity object itself. + */ + public ResourceManagementEntity withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the homeTenantId property: The home tenant id. + * + * @return the homeTenantId value. + */ + public String homeTenantId() { + return this.homeTenantId; + } + + /** + * Set the homeTenantId property: The home tenant id. + * + * @param homeTenantId the homeTenantId value to set. + * @return the ResourceManagementEntity object itself. + */ + public ResourceManagementEntity withHomeTenantId(String homeTenantId) { + this.homeTenantId = homeTenantId; + return this; + } + + /** + * Get the location property: The location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The location. + * + * @param location the location value to set. + * @return the ResourceManagementEntity object itself. + */ + public ResourceManagementEntity withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the status property: The operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resourceId in model ResourceManagementEntity")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceManagementEntity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("homeTenantId", this.homeTenantId); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceManagementEntity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceManagementEntity 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 ResourceManagementEntity. + */ + public static ResourceManagementEntity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceManagementEntity deserializedResourceManagementEntity = new ResourceManagementEntity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedResourceManagementEntity.resourceId = reader.getString(); + } else if ("homeTenantId".equals(fieldName)) { + deserializedResourceManagementEntity.homeTenantId = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedResourceManagementEntity.location = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedResourceManagementEntity.status = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceManagementEntity; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceMovePolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceMovePolicy.java index d9aa36f0e2fd..fa13e2cc548c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceMovePolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceMovePolicy.java @@ -17,17 +17,17 @@ @Fluent public class ResourceMovePolicy implements JsonSerializable { /* - * The validationRequired property. + * Whether validation is required. */ private Boolean validationRequired; /* - * The crossResourceGroupMoveEnabled property. + * Whether cross resource group move is enabled. */ private Boolean crossResourceGroupMoveEnabled; /* - * The crossSubscriptionMoveEnabled property. + * Whether cross subscription move is enabled. */ private Boolean crossSubscriptionMoveEnabled; @@ -38,7 +38,7 @@ public ResourceMovePolicy() { } /** - * Get the validationRequired property: The validationRequired property. + * Get the validationRequired property: Whether validation is required. * * @return the validationRequired value. */ @@ -47,7 +47,7 @@ public Boolean validationRequired() { } /** - * Set the validationRequired property: The validationRequired property. + * Set the validationRequired property: Whether validation is required. * * @param validationRequired the validationRequired value to set. * @return the ResourceMovePolicy object itself. @@ -58,7 +58,7 @@ public ResourceMovePolicy withValidationRequired(Boolean validationRequired) { } /** - * Get the crossResourceGroupMoveEnabled property: The crossResourceGroupMoveEnabled property. + * Get the crossResourceGroupMoveEnabled property: Whether cross resource group move is enabled. * * @return the crossResourceGroupMoveEnabled value. */ @@ -67,7 +67,7 @@ public Boolean crossResourceGroupMoveEnabled() { } /** - * Set the crossResourceGroupMoveEnabled property: The crossResourceGroupMoveEnabled property. + * Set the crossResourceGroupMoveEnabled property: Whether cross resource group move is enabled. * * @param crossResourceGroupMoveEnabled the crossResourceGroupMoveEnabled value to set. * @return the ResourceMovePolicy object itself. @@ -78,7 +78,7 @@ public ResourceMovePolicy withCrossResourceGroupMoveEnabled(Boolean crossResourc } /** - * Get the crossSubscriptionMoveEnabled property: The crossSubscriptionMoveEnabled property. + * Get the crossSubscriptionMoveEnabled property: Whether cross subscription move is enabled. * * @return the crossSubscriptionMoveEnabled value. */ @@ -87,7 +87,7 @@ public Boolean crossSubscriptionMoveEnabled() { } /** - * Set the crossSubscriptionMoveEnabled property: The crossSubscriptionMoveEnabled property. + * Set the crossSubscriptionMoveEnabled property: Whether cross subscription move is enabled. * * @param crossSubscriptionMoveEnabled the crossSubscriptionMoveEnabled value to set. * @return the ResourceMovePolicy object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthentication.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthentication.java index 9e74a7f52d0d..2415d2a7cbf4 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthentication.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthentication.java @@ -19,7 +19,7 @@ @Fluent public class ResourceProviderAuthentication implements JsonSerializable { /* - * The allowedAudiences property. + * The allowed audiences. */ private List allowedAudiences; @@ -30,7 +30,7 @@ public ResourceProviderAuthentication() { } /** - * Get the allowedAudiences property: The allowedAudiences property. + * Get the allowedAudiences property: The allowed audiences. * * @return the allowedAudiences value. */ @@ -39,7 +39,7 @@ public List allowedAudiences() { } /** - * Set the allowedAudiences property: The allowedAudiences property. + * Set the allowedAudiences property: The allowed audiences. * * @param allowedAudiences the allowedAudiences value to set. * @return the ResourceProviderAuthentication object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorization.java index 535f5aa35e91..e7c904d1569f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorization.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorization.java @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * The ResourceProviderAuthorization model. @@ -17,20 +18,35 @@ @Fluent public final class ResourceProviderAuthorization implements JsonSerializable { /* - * The applicationId property. + * The application id. */ private String applicationId; /* - * The roleDefinitionId property. + * The role definition id. */ private String roleDefinitionId; /* - * The managedByRoleDefinitionId property. + * The managed by role definition id. */ private String managedByRoleDefinitionId; + /* + * Managed by authorization. + */ + private ResourceProviderAuthorizationManagedByAuthorization managedByAuthorization; + + /* + * The allowed third party extensions. + */ + private List allowedThirdPartyExtensions; + + /* + * The grouping tag. + */ + private String groupingTag; + /** * Creates an instance of ResourceProviderAuthorization class. */ @@ -38,7 +54,7 @@ public ResourceProviderAuthorization() { } /** - * Get the applicationId property: The applicationId property. + * Get the applicationId property: The application id. * * @return the applicationId value. */ @@ -47,7 +63,7 @@ public String applicationId() { } /** - * Set the applicationId property: The applicationId property. + * Set the applicationId property: The application id. * * @param applicationId the applicationId value to set. * @return the ResourceProviderAuthorization object itself. @@ -58,7 +74,7 @@ public ResourceProviderAuthorization withApplicationId(String applicationId) { } /** - * Get the roleDefinitionId property: The roleDefinitionId property. + * Get the roleDefinitionId property: The role definition id. * * @return the roleDefinitionId value. */ @@ -67,7 +83,7 @@ public String roleDefinitionId() { } /** - * Set the roleDefinitionId property: The roleDefinitionId property. + * Set the roleDefinitionId property: The role definition id. * * @param roleDefinitionId the roleDefinitionId value to set. * @return the ResourceProviderAuthorization object itself. @@ -78,7 +94,7 @@ public ResourceProviderAuthorization withRoleDefinitionId(String roleDefinitionI } /** - * Get the managedByRoleDefinitionId property: The managedByRoleDefinitionId property. + * Get the managedByRoleDefinitionId property: The managed by role definition id. * * @return the managedByRoleDefinitionId value. */ @@ -87,7 +103,7 @@ public String managedByRoleDefinitionId() { } /** - * Set the managedByRoleDefinitionId property: The managedByRoleDefinitionId property. + * Set the managedByRoleDefinitionId property: The managed by role definition id. * * @param managedByRoleDefinitionId the managedByRoleDefinitionId value to set. * @return the ResourceProviderAuthorization object itself. @@ -97,12 +113,80 @@ public ResourceProviderAuthorization withManagedByRoleDefinitionId(String manage return this; } + /** + * Get the managedByAuthorization property: Managed by authorization. + * + * @return the managedByAuthorization value. + */ + public ResourceProviderAuthorizationManagedByAuthorization managedByAuthorization() { + return this.managedByAuthorization; + } + + /** + * Set the managedByAuthorization property: Managed by authorization. + * + * @param managedByAuthorization the managedByAuthorization value to set. + * @return the ResourceProviderAuthorization object itself. + */ + public ResourceProviderAuthorization + withManagedByAuthorization(ResourceProviderAuthorizationManagedByAuthorization managedByAuthorization) { + this.managedByAuthorization = managedByAuthorization; + return this; + } + + /** + * Get the allowedThirdPartyExtensions property: The allowed third party extensions. + * + * @return the allowedThirdPartyExtensions value. + */ + public List allowedThirdPartyExtensions() { + return this.allowedThirdPartyExtensions; + } + + /** + * Set the allowedThirdPartyExtensions property: The allowed third party extensions. + * + * @param allowedThirdPartyExtensions the allowedThirdPartyExtensions value to set. + * @return the ResourceProviderAuthorization object itself. + */ + public ResourceProviderAuthorization + withAllowedThirdPartyExtensions(List allowedThirdPartyExtensions) { + this.allowedThirdPartyExtensions = allowedThirdPartyExtensions; + return this; + } + + /** + * Get the groupingTag property: The grouping tag. + * + * @return the groupingTag value. + */ + public String groupingTag() { + return this.groupingTag; + } + + /** + * Set the groupingTag property: The grouping tag. + * + * @param groupingTag the groupingTag value to set. + * @return the ResourceProviderAuthorization object itself. + */ + public ResourceProviderAuthorization withGroupingTag(String groupingTag) { + this.groupingTag = groupingTag; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (managedByAuthorization() != null) { + managedByAuthorization().validate(); + } + if (allowedThirdPartyExtensions() != null) { + allowedThirdPartyExtensions().forEach(e -> e.validate()); + } } /** @@ -114,6 +198,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("applicationId", this.applicationId); jsonWriter.writeStringField("roleDefinitionId", this.roleDefinitionId); jsonWriter.writeStringField("managedByRoleDefinitionId", this.managedByRoleDefinitionId); + jsonWriter.writeJsonField("managedByAuthorization", this.managedByAuthorization); + jsonWriter.writeArrayField("allowedThirdPartyExtensions", this.allowedThirdPartyExtensions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("groupingTag", this.groupingTag); return jsonWriter.writeEndObject(); } @@ -139,6 +227,15 @@ public static ResourceProviderAuthorization fromJson(JsonReader jsonReader) thro deserializedResourceProviderAuthorization.roleDefinitionId = reader.getString(); } else if ("managedByRoleDefinitionId".equals(fieldName)) { deserializedResourceProviderAuthorization.managedByRoleDefinitionId = reader.getString(); + } else if ("managedByAuthorization".equals(fieldName)) { + deserializedResourceProviderAuthorization.managedByAuthorization + = ResourceProviderAuthorizationManagedByAuthorization.fromJson(reader); + } else if ("allowedThirdPartyExtensions".equals(fieldName)) { + List allowedThirdPartyExtensions + = reader.readArray(reader1 -> ThirdPartyExtension.fromJson(reader1)); + deserializedResourceProviderAuthorization.allowedThirdPartyExtensions = allowedThirdPartyExtensions; + } else if ("groupingTag".equals(fieldName)) { + deserializedResourceProviderAuthorization.groupingTag = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationManagedByAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationManagedByAuthorization.java new file mode 100644 index 000000000000..7c5bfefa6469 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationManagedByAuthorization.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Managed by authorization. + */ +@Fluent +public final class ResourceProviderAuthorizationManagedByAuthorization + implements JsonSerializable { + /* + * The additionalAuthorizations property. + */ + private List additionalAuthorizations; + + /* + * The managed by resource role definition ID for the application. + */ + private String managedByResourceRoleDefinitionId; + + /* + * Indicates whether the managed by resource role definition ID should be inherited. + */ + private Boolean allowManagedByInheritance; + + /** + * Creates an instance of ResourceProviderAuthorizationManagedByAuthorization class. + */ + public ResourceProviderAuthorizationManagedByAuthorization() { + } + + /** + * Get the additionalAuthorizations property: The additionalAuthorizations property. + * + * @return the additionalAuthorizations value. + */ + public List additionalAuthorizations() { + return this.additionalAuthorizations; + } + + /** + * Set the additionalAuthorizations property: The additionalAuthorizations property. + * + * @param additionalAuthorizations the additionalAuthorizations value to set. + * @return the ResourceProviderAuthorizationManagedByAuthorization object itself. + */ + public ResourceProviderAuthorizationManagedByAuthorization + withAdditionalAuthorizations(List additionalAuthorizations) { + this.additionalAuthorizations = additionalAuthorizations; + return this; + } + + /** + * Get the managedByResourceRoleDefinitionId property: The managed by resource role definition ID for the + * application. + * + * @return the managedByResourceRoleDefinitionId value. + */ + public String managedByResourceRoleDefinitionId() { + return this.managedByResourceRoleDefinitionId; + } + + /** + * Set the managedByResourceRoleDefinitionId property: The managed by resource role definition ID for the + * application. + * + * @param managedByResourceRoleDefinitionId the managedByResourceRoleDefinitionId value to set. + * @return the ResourceProviderAuthorizationManagedByAuthorization object itself. + */ + public ResourceProviderAuthorizationManagedByAuthorization + withManagedByResourceRoleDefinitionId(String managedByResourceRoleDefinitionId) { + this.managedByResourceRoleDefinitionId = managedByResourceRoleDefinitionId; + return this; + } + + /** + * Get the allowManagedByInheritance property: Indicates whether the managed by resource role definition ID should + * be inherited. + * + * @return the allowManagedByInheritance value. + */ + public Boolean allowManagedByInheritance() { + return this.allowManagedByInheritance; + } + + /** + * Set the allowManagedByInheritance property: Indicates whether the managed by resource role definition ID should + * be inherited. + * + * @param allowManagedByInheritance the allowManagedByInheritance value to set. + * @return the ResourceProviderAuthorizationManagedByAuthorization object itself. + */ + public ResourceProviderAuthorizationManagedByAuthorization + withAllowManagedByInheritance(Boolean allowManagedByInheritance) { + this.allowManagedByInheritance = allowManagedByInheritance; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (additionalAuthorizations() != null) { + additionalAuthorizations().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("additionalAuthorizations", this.additionalAuthorizations, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("managedByResourceRoleDefinitionId", this.managedByResourceRoleDefinitionId); + jsonWriter.writeBooleanField("allowManagedByInheritance", this.allowManagedByInheritance); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderAuthorizationManagedByAuthorization from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderAuthorizationManagedByAuthorization 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 ResourceProviderAuthorizationManagedByAuthorization. + */ + public static ResourceProviderAuthorizationManagedByAuthorization fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderAuthorizationManagedByAuthorization deserializedResourceProviderAuthorizationManagedByAuthorization + = new ResourceProviderAuthorizationManagedByAuthorization(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("additionalAuthorizations".equals(fieldName)) { + List additionalAuthorizations + = reader.readArray(reader1 -> AdditionalAuthorization.fromJson(reader1)); + deserializedResourceProviderAuthorizationManagedByAuthorization.additionalAuthorizations + = additionalAuthorizations; + } else if ("managedByResourceRoleDefinitionId".equals(fieldName)) { + deserializedResourceProviderAuthorizationManagedByAuthorization.managedByResourceRoleDefinitionId + = reader.getString(); + } else if ("allowManagedByInheritance".equals(fieldName)) { + deserializedResourceProviderAuthorizationManagedByAuthorization.allowManagedByInheritance + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderAuthorizationManagedByAuthorization; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationRules.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationRules.java new file mode 100644 index 000000000000..44955dde2bac --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderAuthorizationRules.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ResourceProviderAuthorizationRules model. + */ +@Fluent +public final class ResourceProviderAuthorizationRules implements JsonSerializable { + /* + * The async operation polling rules. + */ + private AsyncOperationPollingRules asyncOperationPollingRules; + + /** + * Creates an instance of ResourceProviderAuthorizationRules class. + */ + public ResourceProviderAuthorizationRules() { + } + + /** + * Get the asyncOperationPollingRules property: The async operation polling rules. + * + * @return the asyncOperationPollingRules value. + */ + public AsyncOperationPollingRules asyncOperationPollingRules() { + return this.asyncOperationPollingRules; + } + + /** + * Set the asyncOperationPollingRules property: The async operation polling rules. + * + * @param asyncOperationPollingRules the asyncOperationPollingRules value to set. + * @return the ResourceProviderAuthorizationRules object itself. + */ + public ResourceProviderAuthorizationRules + withAsyncOperationPollingRules(AsyncOperationPollingRules asyncOperationPollingRules) { + this.asyncOperationPollingRules = asyncOperationPollingRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (asyncOperationPollingRules() != null) { + asyncOperationPollingRules().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("asyncOperationPollingRules", this.asyncOperationPollingRules); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderAuthorizationRules from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderAuthorizationRules 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 ResourceProviderAuthorizationRules. + */ + public static ResourceProviderAuthorizationRules fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderAuthorizationRules deserializedResourceProviderAuthorizationRules + = new ResourceProviderAuthorizationRules(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("asyncOperationPollingRules".equals(fieldName)) { + deserializedResourceProviderAuthorizationRules.asyncOperationPollingRules + = AsyncOperationPollingRules.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderAuthorizationRules; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilities.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilities.java index 5dd4bb84afed..02b0ca165918 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilities.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilities.java @@ -19,17 +19,17 @@ @Fluent public final class ResourceProviderCapabilities implements JsonSerializable { /* - * The quotaId property. + * The quota id. */ private String quotaId; /* - * The effect property. + * The effect. */ private ResourceProviderCapabilitiesEffect effect; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; @@ -40,7 +40,7 @@ public ResourceProviderCapabilities() { } /** - * Get the quotaId property: The quotaId property. + * Get the quotaId property: The quota id. * * @return the quotaId value. */ @@ -49,7 +49,7 @@ public String quotaId() { } /** - * Set the quotaId property: The quotaId property. + * Set the quotaId property: The quota id. * * @param quotaId the quotaId value to set. * @return the ResourceProviderCapabilities object itself. @@ -60,7 +60,7 @@ public ResourceProviderCapabilities withQuotaId(String quotaId) { } /** - * Get the effect property: The effect property. + * Get the effect property: The effect. * * @return the effect value. */ @@ -69,7 +69,7 @@ public ResourceProviderCapabilitiesEffect effect() { } /** - * Set the effect property: The effect property. + * Set the effect property: The effect. * * @param effect the effect value to set. * @return the ResourceProviderCapabilities object itself. @@ -80,7 +80,7 @@ public ResourceProviderCapabilities withEffect(ResourceProviderCapabilitiesEffec } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -89,7 +89,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the ResourceProviderCapabilities object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilitiesEffect.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilitiesEffect.java index 61f24f05f4cc..eb2a0adc3f05 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilitiesEffect.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderCapabilitiesEffect.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ResourceProviderCapabilitiesEffect. + * The effect. */ public final class ResourceProviderCapabilitiesEffect extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpoint.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpoint.java index 6ee9f34ca531..1eaa0737ba91 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpoint.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpoint.java @@ -20,40 +20,50 @@ @Fluent public final class ResourceProviderEndpoint implements JsonSerializable { /* - * The enabled property. + * Whether the endpoint is enabled. */ private Boolean enabled; /* - * The apiVersions property. + * The api versions. */ private List apiVersions; /* - * The endpointUri property. + * The endpoint uri. */ private String endpointUri; /* - * The locations property. + * The locations. */ private List locations; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; /* - * The featuresRule property. + * The feature rules. */ private ResourceProviderEndpointFeaturesRule featuresRule; /* - * The timeout property. + * The timeout. */ private Duration timeout; + /* + * The endpoint type. + */ + private EndpointType endpointType; + + /* + * The sku link. + */ + private String skuLink; + /** * Creates an instance of ResourceProviderEndpoint class. */ @@ -61,7 +71,7 @@ public ResourceProviderEndpoint() { } /** - * Get the enabled property: The enabled property. + * Get the enabled property: Whether the endpoint is enabled. * * @return the enabled value. */ @@ -70,7 +80,7 @@ public Boolean enabled() { } /** - * Set the enabled property: The enabled property. + * Set the enabled property: Whether the endpoint is enabled. * * @param enabled the enabled value to set. * @return the ResourceProviderEndpoint object itself. @@ -81,7 +91,7 @@ public ResourceProviderEndpoint withEnabled(Boolean enabled) { } /** - * Get the apiVersions property: The apiVersions property. + * Get the apiVersions property: The api versions. * * @return the apiVersions value. */ @@ -90,7 +100,7 @@ public List apiVersions() { } /** - * Set the apiVersions property: The apiVersions property. + * Set the apiVersions property: The api versions. * * @param apiVersions the apiVersions value to set. * @return the ResourceProviderEndpoint object itself. @@ -101,7 +111,7 @@ public ResourceProviderEndpoint withApiVersions(List apiVersions) { } /** - * Get the endpointUri property: The endpointUri property. + * Get the endpointUri property: The endpoint uri. * * @return the endpointUri value. */ @@ -110,7 +120,7 @@ public String endpointUri() { } /** - * Set the endpointUri property: The endpointUri property. + * Set the endpointUri property: The endpoint uri. * * @param endpointUri the endpointUri value to set. * @return the ResourceProviderEndpoint object itself. @@ -121,7 +131,7 @@ public ResourceProviderEndpoint withEndpointUri(String endpointUri) { } /** - * Get the locations property: The locations property. + * Get the locations property: The locations. * * @return the locations value. */ @@ -130,7 +140,7 @@ public List locations() { } /** - * Set the locations property: The locations property. + * Set the locations property: The locations. * * @param locations the locations value to set. * @return the ResourceProviderEndpoint object itself. @@ -141,7 +151,7 @@ public ResourceProviderEndpoint withLocations(List locations) { } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -150,7 +160,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the ResourceProviderEndpoint object itself. @@ -161,7 +171,7 @@ public ResourceProviderEndpoint withRequiredFeatures(List requiredFeatur } /** - * Get the featuresRule property: The featuresRule property. + * Get the featuresRule property: The feature rules. * * @return the featuresRule value. */ @@ -170,7 +180,7 @@ public ResourceProviderEndpointFeaturesRule featuresRule() { } /** - * Set the featuresRule property: The featuresRule property. + * Set the featuresRule property: The feature rules. * * @param featuresRule the featuresRule value to set. * @return the ResourceProviderEndpoint object itself. @@ -181,7 +191,7 @@ public ResourceProviderEndpoint withFeaturesRule(ResourceProviderEndpointFeature } /** - * Get the timeout property: The timeout property. + * Get the timeout property: The timeout. * * @return the timeout value. */ @@ -190,7 +200,7 @@ public Duration timeout() { } /** - * Set the timeout property: The timeout property. + * Set the timeout property: The timeout. * * @param timeout the timeout value to set. * @return the ResourceProviderEndpoint object itself. @@ -200,6 +210,46 @@ public ResourceProviderEndpoint withTimeout(Duration timeout) { return this; } + /** + * Get the endpointType property: The endpoint type. + * + * @return the endpointType value. + */ + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * Set the endpointType property: The endpoint type. + * + * @param endpointType the endpointType value to set. + * @return the ResourceProviderEndpoint object itself. + */ + public ResourceProviderEndpoint withEndpointType(EndpointType endpointType) { + this.endpointType = endpointType; + return this; + } + + /** + * Get the skuLink property: The sku link. + * + * @return the skuLink value. + */ + public String skuLink() { + return this.skuLink; + } + + /** + * Set the skuLink property: The sku link. + * + * @param skuLink the skuLink value to set. + * @return the ResourceProviderEndpoint object itself. + */ + public ResourceProviderEndpoint withSkuLink(String skuLink) { + this.skuLink = skuLink; + return this; + } + /** * Validates the instance. * @@ -225,6 +275,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("featuresRule", this.featuresRule); jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("skuLink", this.skuLink); return jsonWriter.writeEndObject(); } @@ -262,6 +314,10 @@ public static ResourceProviderEndpoint fromJson(JsonReader jsonReader) throws IO } else if ("timeout".equals(fieldName)) { deserializedResourceProviderEndpoint.timeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("endpointType".equals(fieldName)) { + deserializedResourceProviderEndpoint.endpointType = EndpointType.fromString(reader.getString()); + } else if ("skuLink".equals(fieldName)) { + deserializedResourceProviderEndpoint.skuLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpointFeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpointFeaturesRule.java index 54b673216650..ce28cf7bb14d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpointFeaturesRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderEndpointFeaturesRule.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ResourceProviderEndpointFeaturesRule model. + * The feature rules. */ @Fluent public final class ResourceProviderEndpointFeaturesRule extends FeaturesRule { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagement.java index 333310a0503d..ecdf61c3442f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagement.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagement.java @@ -18,44 +18,79 @@ @Fluent public class ResourceProviderManagement implements JsonSerializable { /* - * The schemaOwners property. + * The schema owners. */ private List schemaOwners; /* - * The manifestOwners property. + * The manifest owners. */ private List manifestOwners; /* - * The incidentRoutingService property. + * The authorization owners. + */ + private List authorizationOwners; + + /* + * The incident routing service. */ private String incidentRoutingService; /* - * The incidentRoutingTeam property. + * The incident routing team. */ private String incidentRoutingTeam; /* - * The incidentContactEmail property. + * The incident contact email. */ private String incidentContactEmail; /* - * The serviceTreeInfos property. + * The service tree infos. */ private List serviceTreeInfos; /* - * The resourceAccessPolicy property. + * The resource access policy. */ private ResourceAccessPolicy resourceAccessPolicy; /* - * The resourceAccessRoles property. + * The resource access roles. + */ + private List resourceAccessRoles; + + /* + * List of expedited rollout submitters. + */ + private List expeditedRolloutSubmitters; + + /* + * Options for error response messages. + */ + private ResourceProviderManagementErrorResponseMessageOptions errorResponseMessageOptions; + + /* + * Metadata for expedited rollout. + */ + private ResourceProviderManagementExpeditedRolloutMetadata expeditedRolloutMetadata; + + /* + * List of manifest owners for canary. + */ + private List canaryManifestOwners; + + /* + * The profit center code for the subscription. + */ + private String pcCode; + + /* + * The profit center program id for the subscription. */ - private List resourceAccessRoles; + private String profitCenterProgramId; /** * Creates an instance of ResourceProviderManagement class. @@ -64,7 +99,7 @@ public ResourceProviderManagement() { } /** - * Get the schemaOwners property: The schemaOwners property. + * Get the schemaOwners property: The schema owners. * * @return the schemaOwners value. */ @@ -73,7 +108,7 @@ public List schemaOwners() { } /** - * Set the schemaOwners property: The schemaOwners property. + * Set the schemaOwners property: The schema owners. * * @param schemaOwners the schemaOwners value to set. * @return the ResourceProviderManagement object itself. @@ -84,7 +119,7 @@ public ResourceProviderManagement withSchemaOwners(List schemaOwners) { } /** - * Get the manifestOwners property: The manifestOwners property. + * Get the manifestOwners property: The manifest owners. * * @return the manifestOwners value. */ @@ -93,7 +128,7 @@ public List manifestOwners() { } /** - * Set the manifestOwners property: The manifestOwners property. + * Set the manifestOwners property: The manifest owners. * * @param manifestOwners the manifestOwners value to set. * @return the ResourceProviderManagement object itself. @@ -104,7 +139,27 @@ public ResourceProviderManagement withManifestOwners(List manifestOwners } /** - * Get the incidentRoutingService property: The incidentRoutingService property. + * Get the authorizationOwners property: The authorization owners. + * + * @return the authorizationOwners value. + */ + public List authorizationOwners() { + return this.authorizationOwners; + } + + /** + * Set the authorizationOwners property: The authorization owners. + * + * @param authorizationOwners the authorizationOwners value to set. + * @return the ResourceProviderManagement object itself. + */ + public ResourceProviderManagement withAuthorizationOwners(List authorizationOwners) { + this.authorizationOwners = authorizationOwners; + return this; + } + + /** + * Get the incidentRoutingService property: The incident routing service. * * @return the incidentRoutingService value. */ @@ -113,7 +168,7 @@ public String incidentRoutingService() { } /** - * Set the incidentRoutingService property: The incidentRoutingService property. + * Set the incidentRoutingService property: The incident routing service. * * @param incidentRoutingService the incidentRoutingService value to set. * @return the ResourceProviderManagement object itself. @@ -124,7 +179,7 @@ public ResourceProviderManagement withIncidentRoutingService(String incidentRout } /** - * Get the incidentRoutingTeam property: The incidentRoutingTeam property. + * Get the incidentRoutingTeam property: The incident routing team. * * @return the incidentRoutingTeam value. */ @@ -133,7 +188,7 @@ public String incidentRoutingTeam() { } /** - * Set the incidentRoutingTeam property: The incidentRoutingTeam property. + * Set the incidentRoutingTeam property: The incident routing team. * * @param incidentRoutingTeam the incidentRoutingTeam value to set. * @return the ResourceProviderManagement object itself. @@ -144,7 +199,7 @@ public ResourceProviderManagement withIncidentRoutingTeam(String incidentRouting } /** - * Get the incidentContactEmail property: The incidentContactEmail property. + * Get the incidentContactEmail property: The incident contact email. * * @return the incidentContactEmail value. */ @@ -153,7 +208,7 @@ public String incidentContactEmail() { } /** - * Set the incidentContactEmail property: The incidentContactEmail property. + * Set the incidentContactEmail property: The incident contact email. * * @param incidentContactEmail the incidentContactEmail value to set. * @return the ResourceProviderManagement object itself. @@ -164,7 +219,7 @@ public ResourceProviderManagement withIncidentContactEmail(String incidentContac } /** - * Get the serviceTreeInfos property: The serviceTreeInfos property. + * Get the serviceTreeInfos property: The service tree infos. * * @return the serviceTreeInfos value. */ @@ -173,7 +228,7 @@ public List serviceTreeInfos() { } /** - * Set the serviceTreeInfos property: The serviceTreeInfos property. + * Set the serviceTreeInfos property: The service tree infos. * * @param serviceTreeInfos the serviceTreeInfos value to set. * @return the ResourceProviderManagement object itself. @@ -184,7 +239,7 @@ public ResourceProviderManagement withServiceTreeInfos(List ser } /** - * Get the resourceAccessPolicy property: The resourceAccessPolicy property. + * Get the resourceAccessPolicy property: The resource access policy. * * @return the resourceAccessPolicy value. */ @@ -193,7 +248,7 @@ public ResourceAccessPolicy resourceAccessPolicy() { } /** - * Set the resourceAccessPolicy property: The resourceAccessPolicy property. + * Set the resourceAccessPolicy property: The resource access policy. * * @param resourceAccessPolicy the resourceAccessPolicy value to set. * @return the ResourceProviderManagement object itself. @@ -204,25 +259,147 @@ public ResourceProviderManagement withResourceAccessPolicy(ResourceAccessPolicy } /** - * Get the resourceAccessRoles property: The resourceAccessRoles property. + * Get the resourceAccessRoles property: The resource access roles. * * @return the resourceAccessRoles value. */ - public List resourceAccessRoles() { + public List resourceAccessRoles() { return this.resourceAccessRoles; } /** - * Set the resourceAccessRoles property: The resourceAccessRoles property. + * Set the resourceAccessRoles property: The resource access roles. * * @param resourceAccessRoles the resourceAccessRoles value to set. * @return the ResourceProviderManagement object itself. */ - public ResourceProviderManagement withResourceAccessRoles(List resourceAccessRoles) { + public ResourceProviderManagement withResourceAccessRoles(List resourceAccessRoles) { this.resourceAccessRoles = resourceAccessRoles; return this; } + /** + * Get the expeditedRolloutSubmitters property: List of expedited rollout submitters. + * + * @return the expeditedRolloutSubmitters value. + */ + public List expeditedRolloutSubmitters() { + return this.expeditedRolloutSubmitters; + } + + /** + * Set the expeditedRolloutSubmitters property: List of expedited rollout submitters. + * + * @param expeditedRolloutSubmitters the expeditedRolloutSubmitters value to set. + * @return the ResourceProviderManagement object itself. + */ + public ResourceProviderManagement withExpeditedRolloutSubmitters(List expeditedRolloutSubmitters) { + this.expeditedRolloutSubmitters = expeditedRolloutSubmitters; + return this; + } + + /** + * Get the errorResponseMessageOptions property: Options for error response messages. + * + * @return the errorResponseMessageOptions value. + */ + public ResourceProviderManagementErrorResponseMessageOptions errorResponseMessageOptions() { + return this.errorResponseMessageOptions; + } + + /** + * Set the errorResponseMessageOptions property: Options for error response messages. + * + * @param errorResponseMessageOptions the errorResponseMessageOptions value to set. + * @return the ResourceProviderManagement object itself. + */ + public ResourceProviderManagement withErrorResponseMessageOptions( + ResourceProviderManagementErrorResponseMessageOptions errorResponseMessageOptions) { + this.errorResponseMessageOptions = errorResponseMessageOptions; + return this; + } + + /** + * Get the expeditedRolloutMetadata property: Metadata for expedited rollout. + * + * @return the expeditedRolloutMetadata value. + */ + public ResourceProviderManagementExpeditedRolloutMetadata expeditedRolloutMetadata() { + return this.expeditedRolloutMetadata; + } + + /** + * Set the expeditedRolloutMetadata property: Metadata for expedited rollout. + * + * @param expeditedRolloutMetadata the expeditedRolloutMetadata value to set. + * @return the ResourceProviderManagement object itself. + */ + public ResourceProviderManagement + withExpeditedRolloutMetadata(ResourceProviderManagementExpeditedRolloutMetadata expeditedRolloutMetadata) { + this.expeditedRolloutMetadata = expeditedRolloutMetadata; + return this; + } + + /** + * Get the canaryManifestOwners property: List of manifest owners for canary. + * + * @return the canaryManifestOwners value. + */ + public List canaryManifestOwners() { + return this.canaryManifestOwners; + } + + /** + * Set the canaryManifestOwners property: List of manifest owners for canary. + * + * @param canaryManifestOwners the canaryManifestOwners value to set. + * @return the ResourceProviderManagement object itself. + */ + public ResourceProviderManagement withCanaryManifestOwners(List canaryManifestOwners) { + this.canaryManifestOwners = canaryManifestOwners; + return this; + } + + /** + * Get the pcCode property: The profit center code for the subscription. + * + * @return the pcCode value. + */ + public String pcCode() { + return this.pcCode; + } + + /** + * Set the pcCode property: The profit center code for the subscription. + * + * @param pcCode the pcCode value to set. + * @return the ResourceProviderManagement object itself. + */ + public ResourceProviderManagement withPcCode(String pcCode) { + this.pcCode = pcCode; + return this; + } + + /** + * Get the profitCenterProgramId property: The profit center program id for the subscription. + * + * @return the profitCenterProgramId value. + */ + public String profitCenterProgramId() { + return this.profitCenterProgramId; + } + + /** + * Set the profitCenterProgramId property: The profit center program id for the subscription. + * + * @param profitCenterProgramId the profitCenterProgramId value to set. + * @return the ResourceProviderManagement object itself. + */ + public ResourceProviderManagement withProfitCenterProgramId(String profitCenterProgramId) { + this.profitCenterProgramId = profitCenterProgramId; + return this; + } + /** * Validates the instance. * @@ -232,6 +409,15 @@ public void validate() { if (serviceTreeInfos() != null) { serviceTreeInfos().forEach(e -> e.validate()); } + if (resourceAccessRoles() != null) { + resourceAccessRoles().forEach(e -> e.validate()); + } + if (errorResponseMessageOptions() != null) { + errorResponseMessageOptions().validate(); + } + if (expeditedRolloutMetadata() != null) { + expeditedRolloutMetadata().validate(); + } } /** @@ -243,6 +429,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("schemaOwners", this.schemaOwners, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("manifestOwners", this.manifestOwners, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("authorizationOwners", this.authorizationOwners, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("incidentRoutingService", this.incidentRoutingService); jsonWriter.writeStringField("incidentRoutingTeam", this.incidentRoutingTeam); jsonWriter.writeStringField("incidentContactEmail", this.incidentContactEmail); @@ -251,7 +439,15 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("resourceAccessPolicy", this.resourceAccessPolicy == null ? null : this.resourceAccessPolicy.toString()); jsonWriter.writeArrayField("resourceAccessRoles", this.resourceAccessRoles, - (writer, element) -> writer.writeUntyped(element)); + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("expeditedRolloutSubmitters", this.expeditedRolloutSubmitters, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("errorResponseMessageOptions", this.errorResponseMessageOptions); + jsonWriter.writeJsonField("expeditedRolloutMetadata", this.expeditedRolloutMetadata); + jsonWriter.writeArrayField("canaryManifestOwners", this.canaryManifestOwners, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("pcCode", this.pcCode); + jsonWriter.writeStringField("profitCenterProgramId", this.profitCenterProgramId); return jsonWriter.writeEndObject(); } @@ -276,6 +472,9 @@ public static ResourceProviderManagement fromJson(JsonReader jsonReader) throws } else if ("manifestOwners".equals(fieldName)) { List manifestOwners = reader.readArray(reader1 -> reader1.getString()); deserializedResourceProviderManagement.manifestOwners = manifestOwners; + } else if ("authorizationOwners".equals(fieldName)) { + List authorizationOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManagement.authorizationOwners = authorizationOwners; } else if ("incidentRoutingService".equals(fieldName)) { deserializedResourceProviderManagement.incidentRoutingService = reader.getString(); } else if ("incidentRoutingTeam".equals(fieldName)) { @@ -290,8 +489,25 @@ public static ResourceProviderManagement fromJson(JsonReader jsonReader) throws deserializedResourceProviderManagement.resourceAccessPolicy = ResourceAccessPolicy.fromString(reader.getString()); } else if ("resourceAccessRoles".equals(fieldName)) { - List resourceAccessRoles = reader.readArray(reader1 -> reader1.readUntyped()); + List resourceAccessRoles + = reader.readArray(reader1 -> ResourceAccessRole.fromJson(reader1)); deserializedResourceProviderManagement.resourceAccessRoles = resourceAccessRoles; + } else if ("expeditedRolloutSubmitters".equals(fieldName)) { + List expeditedRolloutSubmitters = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManagement.expeditedRolloutSubmitters = expeditedRolloutSubmitters; + } else if ("errorResponseMessageOptions".equals(fieldName)) { + deserializedResourceProviderManagement.errorResponseMessageOptions + = ResourceProviderManagementErrorResponseMessageOptions.fromJson(reader); + } else if ("expeditedRolloutMetadata".equals(fieldName)) { + deserializedResourceProviderManagement.expeditedRolloutMetadata + = ResourceProviderManagementExpeditedRolloutMetadata.fromJson(reader); + } else if ("canaryManifestOwners".equals(fieldName)) { + List canaryManifestOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManagement.canaryManifestOwners = canaryManifestOwners; + } else if ("pcCode".equals(fieldName)) { + deserializedResourceProviderManagement.pcCode = reader.getString(); + } else if ("profitCenterProgramId".equals(fieldName)) { + deserializedResourceProviderManagement.profitCenterProgramId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementErrorResponseMessageOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementErrorResponseMessageOptions.java new file mode 100644 index 000000000000..92b511284854 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementErrorResponseMessageOptions.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Options for error response messages. + */ +@Fluent +public final class ResourceProviderManagementErrorResponseMessageOptions + implements JsonSerializable { + /* + * Type of server failure response message. + */ + private ServerFailureResponseMessageType serverFailureResponseMessageType; + + /** + * Creates an instance of ResourceProviderManagementErrorResponseMessageOptions class. + */ + public ResourceProviderManagementErrorResponseMessageOptions() { + } + + /** + * Get the serverFailureResponseMessageType property: Type of server failure response message. + * + * @return the serverFailureResponseMessageType value. + */ + public ServerFailureResponseMessageType serverFailureResponseMessageType() { + return this.serverFailureResponseMessageType; + } + + /** + * Set the serverFailureResponseMessageType property: Type of server failure response message. + * + * @param serverFailureResponseMessageType the serverFailureResponseMessageType value to set. + * @return the ResourceProviderManagementErrorResponseMessageOptions object itself. + */ + public ResourceProviderManagementErrorResponseMessageOptions + withServerFailureResponseMessageType(ServerFailureResponseMessageType serverFailureResponseMessageType) { + this.serverFailureResponseMessageType = serverFailureResponseMessageType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serverFailureResponseMessageType", + this.serverFailureResponseMessageType == null ? null : this.serverFailureResponseMessageType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderManagementErrorResponseMessageOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderManagementErrorResponseMessageOptions 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 ResourceProviderManagementErrorResponseMessageOptions. + */ + public static ResourceProviderManagementErrorResponseMessageOptions fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderManagementErrorResponseMessageOptions deserializedResourceProviderManagementErrorResponseMessageOptions + = new ResourceProviderManagementErrorResponseMessageOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serverFailureResponseMessageType".equals(fieldName)) { + deserializedResourceProviderManagementErrorResponseMessageOptions.serverFailureResponseMessageType + = ServerFailureResponseMessageType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderManagementErrorResponseMessageOptions; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementExpeditedRolloutMetadata.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementExpeditedRolloutMetadata.java new file mode 100644 index 000000000000..612e862d8984 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManagementExpeditedRolloutMetadata.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Metadata for expedited rollout. + */ +@Fluent +public final class ResourceProviderManagementExpeditedRolloutMetadata + implements JsonSerializable { + /* + * Expedited rollout enabled? + */ + private Boolean enabled; + + /* + * Expedited rollout intent. + */ + private ExpeditedRolloutIntent expeditedRolloutIntent; + + /** + * Creates an instance of ResourceProviderManagementExpeditedRolloutMetadata class. + */ + public ResourceProviderManagementExpeditedRolloutMetadata() { + } + + /** + * Get the enabled property: Expedited rollout enabled?. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Expedited rollout enabled?. + * + * @param enabled the enabled value to set. + * @return the ResourceProviderManagementExpeditedRolloutMetadata object itself. + */ + public ResourceProviderManagementExpeditedRolloutMetadata withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the expeditedRolloutIntent property: Expedited rollout intent. + * + * @return the expeditedRolloutIntent value. + */ + public ExpeditedRolloutIntent expeditedRolloutIntent() { + return this.expeditedRolloutIntent; + } + + /** + * Set the expeditedRolloutIntent property: Expedited rollout intent. + * + * @param expeditedRolloutIntent the expeditedRolloutIntent value to set. + * @return the ResourceProviderManagementExpeditedRolloutMetadata object itself. + */ + public ResourceProviderManagementExpeditedRolloutMetadata + withExpeditedRolloutIntent(ExpeditedRolloutIntent expeditedRolloutIntent) { + this.expeditedRolloutIntent = expeditedRolloutIntent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("expeditedRolloutIntent", + this.expeditedRolloutIntent == null ? null : this.expeditedRolloutIntent.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderManagementExpeditedRolloutMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderManagementExpeditedRolloutMetadata 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 ResourceProviderManagementExpeditedRolloutMetadata. + */ + public static ResourceProviderManagementExpeditedRolloutMetadata fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderManagementExpeditedRolloutMetadata deserializedResourceProviderManagementExpeditedRolloutMetadata + = new ResourceProviderManagementExpeditedRolloutMetadata(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedResourceProviderManagementExpeditedRolloutMetadata.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("expeditedRolloutIntent".equals(fieldName)) { + deserializedResourceProviderManagementExpeditedRolloutMetadata.expeditedRolloutIntent + = ExpeditedRolloutIntent.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderManagementExpeditedRolloutMetadata; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifest.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifest.java index bf3edfeffa63..e38ebce49272 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifest.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifest.java @@ -12,103 +12,152 @@ */ public interface ResourceProviderManifest { /** - * Gets the providerAuthentication property: The providerAuthentication property. + * Gets the providerAuthentication property: The provider authentication. * * @return the providerAuthentication value. */ ResourceProviderManifestProviderAuthentication providerAuthentication(); /** - * Gets the providerAuthorizations property: The providerAuthorizations property. + * Gets the providerAuthorizations property: The provider authorizations. * * @return the providerAuthorizations value. */ List providerAuthorizations(); /** - * Gets the namespace property: The namespace property. + * Gets the namespace property: The namespace. * * @return the namespace value. */ String namespace(); /** - * Gets the providerVersion property: The providerVersion property. + * Gets the services property: The services. + * + * @return the services value. + */ + List services(); + + /** + * Gets the serviceName property: The service name. + * + * @return the serviceName value. + */ + String serviceName(); + + /** + * Gets the providerVersion property: The provider version. * * @return the providerVersion value. */ String providerVersion(); /** - * Gets the providerType property: The providerType property. + * Gets the providerType property: The provider type. * * @return the providerType value. */ ResourceProviderType providerType(); /** - * Gets the requiredFeatures property: The requiredFeatures property. + * Gets the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ List requiredFeatures(); /** - * Gets the featuresRule property: The featuresRule property. + * Gets the featuresRule property: The features rule. * * @return the featuresRule value. */ ResourceProviderManifestFeaturesRule featuresRule(); /** - * Gets the requestHeaderOptions property: The requestHeaderOptions property. + * Gets the requestHeaderOptions property: The request header options. * * @return the requestHeaderOptions value. */ ResourceProviderManifestRequestHeaderOptions requestHeaderOptions(); /** - * Gets the resourceTypes property: The resourceTypes property. + * Gets the resourceTypes property: The resource types. * * @return the resourceTypes value. */ List resourceTypes(); /** - * Gets the management property: The management property. + * Gets the management property: The resource provider management. * * @return the management value. */ ResourceProviderManifestManagement management(); /** - * Gets the capabilities property: The capabilities property. + * Gets the capabilities property: The capabilities. * * @return the capabilities value. */ List capabilities(); /** - * Gets the metadata property: Anything. + * Gets the crossTenantTokenValidation property: The cross tenant token validation. + * + * @return the crossTenantTokenValidation value. + */ + CrossTenantTokenValidation crossTenantTokenValidation(); + + /** + * Gets the metadata property: The metadata. * * @return the metadata value. */ Object metadata(); /** - * Gets the globalNotificationEndpoints property: The globalNotificationEndpoints property. + * Gets the globalNotificationEndpoints property: The global notification endpoints. * * @return the globalNotificationEndpoints value. */ List globalNotificationEndpoints(); /** - * Gets the reRegisterSubscriptionMetadata property: The reRegisterSubscriptionMetadata property. + * Gets the reRegisterSubscriptionMetadata property: The re-register subscription metadata. * * @return the reRegisterSubscriptionMetadata value. */ ResourceProviderManifestReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata(); + /** + * Gets the enableTenantLinkedNotification property: Whether tenant linked notification is enabled. + * + * @return the enableTenantLinkedNotification value. + */ + Boolean enableTenantLinkedNotification(); + + /** + * Gets the notifications property: The notifications. + * + * @return the notifications value. + */ + List notifications(); + + /** + * Gets the linkedNotificationRules property: The linked notification rules. + * + * @return the linkedNotificationRules value. + */ + List linkedNotificationRules(); + + /** + * Gets the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @return the resourceProviderAuthorizationRules value. + */ + ResourceProviderAuthorizationRules resourceProviderAuthorizationRules(); + /** * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.ResourceProviderManifestInner object. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestFeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestFeaturesRule.java index 74029a1d5cf1..a7fe41bc0c05 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestFeaturesRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestFeaturesRule.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ResourceProviderManifestFeaturesRule model. + * The features rule. */ @Fluent public final class ResourceProviderManifestFeaturesRule extends FeaturesRule { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestManagement.java index 41bdb1fb459e..cbeab57dc009 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestManagement.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestManagement.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ResourceProviderManifestManagement model. + * The resource provider management. */ @Fluent public final class ResourceProviderManifestManagement extends ResourceProviderManagement { @@ -40,6 +40,15 @@ public ResourceProviderManifestManagement withManifestOwners(List manife return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestManagement withAuthorizationOwners(List authorizationOwners) { + super.withAuthorizationOwners(authorizationOwners); + return this; + } + /** * {@inheritDoc} */ @@ -89,11 +98,67 @@ public ResourceProviderManifestManagement withResourceAccessPolicy(ResourceAcces * {@inheritDoc} */ @Override - public ResourceProviderManifestManagement withResourceAccessRoles(List resourceAccessRoles) { + public ResourceProviderManifestManagement withResourceAccessRoles(List resourceAccessRoles) { super.withResourceAccessRoles(resourceAccessRoles); return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestManagement withExpeditedRolloutSubmitters(List expeditedRolloutSubmitters) { + super.withExpeditedRolloutSubmitters(expeditedRolloutSubmitters); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestManagement withErrorResponseMessageOptions( + ResourceProviderManagementErrorResponseMessageOptions errorResponseMessageOptions) { + super.withErrorResponseMessageOptions(errorResponseMessageOptions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestManagement + withExpeditedRolloutMetadata(ResourceProviderManagementExpeditedRolloutMetadata expeditedRolloutMetadata) { + super.withExpeditedRolloutMetadata(expeditedRolloutMetadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestManagement withCanaryManifestOwners(List canaryManifestOwners) { + super.withCanaryManifestOwners(canaryManifestOwners); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestManagement withPcCode(String pcCode) { + super.withPcCode(pcCode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestManagement withProfitCenterProgramId(String profitCenterProgramId) { + super.withProfitCenterProgramId(profitCenterProgramId); + return this; + } + /** * Validates the instance. * @@ -104,6 +169,15 @@ public void validate() { if (serviceTreeInfos() != null) { serviceTreeInfos().forEach(e -> e.validate()); } + if (resourceAccessRoles() != null) { + resourceAccessRoles().forEach(e -> e.validate()); + } + if (errorResponseMessageOptions() != null) { + errorResponseMessageOptions().validate(); + } + if (expeditedRolloutMetadata() != null) { + expeditedRolloutMetadata().validate(); + } } /** @@ -115,6 +189,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("schemaOwners", schemaOwners(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("manifestOwners", manifestOwners(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("authorizationOwners", authorizationOwners(), + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("incidentRoutingService", incidentRoutingService()); jsonWriter.writeStringField("incidentRoutingTeam", incidentRoutingTeam()); jsonWriter.writeStringField("incidentContactEmail", incidentContactEmail()); @@ -123,7 +199,15 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("resourceAccessPolicy", resourceAccessPolicy() == null ? null : resourceAccessPolicy().toString()); jsonWriter.writeArrayField("resourceAccessRoles", resourceAccessRoles(), - (writer, element) -> writer.writeUntyped(element)); + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("expeditedRolloutSubmitters", expeditedRolloutSubmitters(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("errorResponseMessageOptions", errorResponseMessageOptions()); + jsonWriter.writeJsonField("expeditedRolloutMetadata", expeditedRolloutMetadata()); + jsonWriter.writeArrayField("canaryManifestOwners", canaryManifestOwners(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("pcCode", pcCode()); + jsonWriter.writeStringField("profitCenterProgramId", profitCenterProgramId()); return jsonWriter.writeEndObject(); } @@ -149,6 +233,9 @@ public static ResourceProviderManifestManagement fromJson(JsonReader jsonReader) } else if ("manifestOwners".equals(fieldName)) { List manifestOwners = reader.readArray(reader1 -> reader1.getString()); deserializedResourceProviderManifestManagement.withManifestOwners(manifestOwners); + } else if ("authorizationOwners".equals(fieldName)) { + List authorizationOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestManagement.withAuthorizationOwners(authorizationOwners); } else if ("incidentRoutingService".equals(fieldName)) { deserializedResourceProviderManifestManagement.withIncidentRoutingService(reader.getString()); } else if ("incidentRoutingTeam".equals(fieldName)) { @@ -163,8 +250,26 @@ public static ResourceProviderManifestManagement fromJson(JsonReader jsonReader) deserializedResourceProviderManifestManagement .withResourceAccessPolicy(ResourceAccessPolicy.fromString(reader.getString())); } else if ("resourceAccessRoles".equals(fieldName)) { - List resourceAccessRoles = reader.readArray(reader1 -> reader1.readUntyped()); + List resourceAccessRoles + = reader.readArray(reader1 -> ResourceAccessRole.fromJson(reader1)); deserializedResourceProviderManifestManagement.withResourceAccessRoles(resourceAccessRoles); + } else if ("expeditedRolloutSubmitters".equals(fieldName)) { + List expeditedRolloutSubmitters = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestManagement + .withExpeditedRolloutSubmitters(expeditedRolloutSubmitters); + } else if ("errorResponseMessageOptions".equals(fieldName)) { + deserializedResourceProviderManifestManagement.withErrorResponseMessageOptions( + ResourceProviderManagementErrorResponseMessageOptions.fromJson(reader)); + } else if ("expeditedRolloutMetadata".equals(fieldName)) { + deserializedResourceProviderManifestManagement.withExpeditedRolloutMetadata( + ResourceProviderManagementExpeditedRolloutMetadata.fromJson(reader)); + } else if ("canaryManifestOwners".equals(fieldName)) { + List canaryManifestOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestManagement.withCanaryManifestOwners(canaryManifestOwners); + } else if ("pcCode".equals(fieldName)) { + deserializedResourceProviderManifestManagement.withPcCode(reader.getString()); + } else if ("profitCenterProgramId".equals(fieldName)) { + deserializedResourceProviderManifestManagement.withProfitCenterProgramId(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProperties.java index 4b38ba6d815f..6df3cbe4cfe1 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProperties.java @@ -18,65 +18,160 @@ @Fluent public class ResourceProviderManifestProperties implements JsonSerializable { /* - * The providerAuthentication property. + * The provider authentication. */ private ResourceProviderManifestPropertiesProviderAuthentication providerAuthentication; /* - * The providerAuthorizations property. + * The provider authorizations. */ private List providerAuthorizations; /* - * The namespace property. + * The namespace. */ private String namespace; /* - * The providerVersion property. + * The services. + */ + private List services; + + /* + * The service name. + */ + private String serviceName; + + /* + * The provider version. */ private String providerVersion; /* - * The providerType property. + * The provider type. */ private ResourceProviderType providerType; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; /* - * The featuresRule property. + * The features rule. */ private ResourceProviderManifestPropertiesFeaturesRule featuresRule; /* - * The requestHeaderOptions property. + * The request header options. */ private ResourceProviderManifestPropertiesRequestHeaderOptions requestHeaderOptions; /* - * The management property. + * The resource provider management. */ private ResourceProviderManifestPropertiesManagement management; /* - * The capabilities property. + * The capabilities. */ private List capabilities; /* - * Anything + * The cross tenant token validation. + */ + private CrossTenantTokenValidation crossTenantTokenValidation; + + /* + * The metadata. */ private Object metadata; /* - * The templateDeploymentOptions property. + * The template deployment options. */ private ResourceProviderManifestPropertiesTemplateDeploymentOptions templateDeploymentOptions; + /* + * The global notification endpoints. + */ + private List globalNotificationEndpoints; + + /* + * The enable tenant linked notification. + */ + private Boolean enableTenantLinkedNotification; + + /* + * The notifications. + */ + private List notifications; + + /* + * The linked notification rules. + */ + private List linkedNotificationRules; + + /* + * The resource provider authorization rules. + */ + private ResourceProviderAuthorizationRules resourceProviderAuthorizationRules; + + /* + * The dsts configuration. + */ + private ResourceProviderManifestPropertiesDstsConfiguration dstsConfiguration; + + /* + * Notification options. + */ + private NotificationOptions notificationOptions; + + /* + * resource hydration accounts + */ + private List resourceHydrationAccounts; + + /* + * Notification settings. + */ + private ResourceProviderManifestPropertiesNotificationSettings notificationSettings; + + /* + * Management groups global notification endpoints. + */ + private List managementGroupGlobalNotificationEndpoints; + + /* + * Optional features. + */ + private List optionalFeatures; + + /* + * Resource group lock option during move. + */ + private ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove; + + /* + * Response options. + */ + private ResourceProviderManifestPropertiesResponseOptions responseOptions; + + /* + * Legacy namespace. + */ + private String legacyNamespace; + + /* + * Legacy registrations. + */ + private List legacyRegistrations; + + /* + * Custom manifest version. + */ + private String customManifestVersion; + /** * Creates an instance of ResourceProviderManifestProperties class. */ @@ -84,7 +179,7 @@ public ResourceProviderManifestProperties() { } /** - * Get the providerAuthentication property: The providerAuthentication property. + * Get the providerAuthentication property: The provider authentication. * * @return the providerAuthentication value. */ @@ -93,7 +188,7 @@ public ResourceProviderManifestPropertiesProviderAuthentication providerAuthenti } /** - * Set the providerAuthentication property: The providerAuthentication property. + * Set the providerAuthentication property: The provider authentication. * * @param providerAuthentication the providerAuthentication value to set. * @return the ResourceProviderManifestProperties object itself. @@ -105,7 +200,7 @@ public ResourceProviderManifestPropertiesProviderAuthentication providerAuthenti } /** - * Get the providerAuthorizations property: The providerAuthorizations property. + * Get the providerAuthorizations property: The provider authorizations. * * @return the providerAuthorizations value. */ @@ -114,7 +209,7 @@ public List providerAuthorizations() { } /** - * Set the providerAuthorizations property: The providerAuthorizations property. + * Set the providerAuthorizations property: The provider authorizations. * * @param providerAuthorizations the providerAuthorizations value to set. * @return the ResourceProviderManifestProperties object itself. @@ -126,7 +221,7 @@ public List providerAuthorizations() { } /** - * Get the namespace property: The namespace property. + * Get the namespace property: The namespace. * * @return the namespace value. */ @@ -135,7 +230,7 @@ public String namespace() { } /** - * Set the namespace property: The namespace property. + * Set the namespace property: The namespace. * * @param namespace the namespace value to set. * @return the ResourceProviderManifestProperties object itself. @@ -146,7 +241,47 @@ public ResourceProviderManifestProperties withNamespace(String namespace) { } /** - * Get the providerVersion property: The providerVersion property. + * Get the services property: The services. + * + * @return the services value. + */ + public List services() { + return this.services; + } + + /** + * Set the services property: The services. + * + * @param services the services value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withServices(List services) { + this.services = services; + return this; + } + + /** + * Get the serviceName property: The service name. + * + * @return the serviceName value. + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the serviceName property: The service name. + * + * @param serviceName the serviceName value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the providerVersion property: The provider version. * * @return the providerVersion value. */ @@ -155,7 +290,7 @@ public String providerVersion() { } /** - * Set the providerVersion property: The providerVersion property. + * Set the providerVersion property: The provider version. * * @param providerVersion the providerVersion value to set. * @return the ResourceProviderManifestProperties object itself. @@ -166,7 +301,7 @@ public ResourceProviderManifestProperties withProviderVersion(String providerVer } /** - * Get the providerType property: The providerType property. + * Get the providerType property: The provider type. * * @return the providerType value. */ @@ -175,7 +310,7 @@ public ResourceProviderType providerType() { } /** - * Set the providerType property: The providerType property. + * Set the providerType property: The provider type. * * @param providerType the providerType value to set. * @return the ResourceProviderManifestProperties object itself. @@ -186,7 +321,7 @@ public ResourceProviderManifestProperties withProviderType(ResourceProviderType } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -195,7 +330,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the ResourceProviderManifestProperties object itself. @@ -206,7 +341,7 @@ public ResourceProviderManifestProperties withRequiredFeatures(List requ } /** - * Get the featuresRule property: The featuresRule property. + * Get the featuresRule property: The features rule. * * @return the featuresRule value. */ @@ -215,7 +350,7 @@ public ResourceProviderManifestPropertiesFeaturesRule featuresRule() { } /** - * Set the featuresRule property: The featuresRule property. + * Set the featuresRule property: The features rule. * * @param featuresRule the featuresRule value to set. * @return the ResourceProviderManifestProperties object itself. @@ -227,7 +362,7 @@ public ResourceProviderManifestPropertiesFeaturesRule featuresRule() { } /** - * Get the requestHeaderOptions property: The requestHeaderOptions property. + * Get the requestHeaderOptions property: The request header options. * * @return the requestHeaderOptions value. */ @@ -236,7 +371,7 @@ public ResourceProviderManifestPropertiesRequestHeaderOptions requestHeaderOptio } /** - * Set the requestHeaderOptions property: The requestHeaderOptions property. + * Set the requestHeaderOptions property: The request header options. * * @param requestHeaderOptions the requestHeaderOptions value to set. * @return the ResourceProviderManifestProperties object itself. @@ -248,7 +383,7 @@ public ResourceProviderManifestPropertiesRequestHeaderOptions requestHeaderOptio } /** - * Get the management property: The management property. + * Get the management property: The resource provider management. * * @return the management value. */ @@ -257,7 +392,7 @@ public ResourceProviderManifestPropertiesManagement management() { } /** - * Set the management property: The management property. + * Set the management property: The resource provider management. * * @param management the management value to set. * @return the ResourceProviderManifestProperties object itself. @@ -268,7 +403,7 @@ public ResourceProviderManifestProperties withManagement(ResourceProviderManifes } /** - * Get the capabilities property: The capabilities property. + * Get the capabilities property: The capabilities. * * @return the capabilities value. */ @@ -277,7 +412,7 @@ public List capabilities() { } /** - * Set the capabilities property: The capabilities property. + * Set the capabilities property: The capabilities. * * @param capabilities the capabilities value to set. * @return the ResourceProviderManifestProperties object itself. @@ -288,7 +423,28 @@ public ResourceProviderManifestProperties withCapabilities(List globalNotificationEndpoints() { + return this.globalNotificationEndpoints; + } + + /** + * Set the globalNotificationEndpoints property: The global notification endpoints. + * + * @param globalNotificationEndpoints the globalNotificationEndpoints value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withGlobalNotificationEndpoints(List globalNotificationEndpoints) { + this.globalNotificationEndpoints = globalNotificationEndpoints; + return this; + } + + /** + * Get the enableTenantLinkedNotification property: The enable tenant linked notification. + * + * @return the enableTenantLinkedNotification value. + */ + public Boolean enableTenantLinkedNotification() { + return this.enableTenantLinkedNotification; + } + + /** + * Set the enableTenantLinkedNotification property: The enable tenant linked notification. + * + * @param enableTenantLinkedNotification the enableTenantLinkedNotification value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withEnableTenantLinkedNotification(Boolean enableTenantLinkedNotification) { + this.enableTenantLinkedNotification = enableTenantLinkedNotification; + return this; + } + + /** + * Get the notifications property: The notifications. + * + * @return the notifications value. + */ + public List notifications() { + return this.notifications; + } + + /** + * Set the notifications property: The notifications. + * + * @param notifications the notifications value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withNotifications(List notifications) { + this.notifications = notifications; + return this; + } + + /** + * Get the linkedNotificationRules property: The linked notification rules. + * + * @return the linkedNotificationRules value. + */ + public List linkedNotificationRules() { + return this.linkedNotificationRules; + } + + /** + * Set the linkedNotificationRules property: The linked notification rules. + * + * @param linkedNotificationRules the linkedNotificationRules value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withLinkedNotificationRules(List linkedNotificationRules) { + this.linkedNotificationRules = linkedNotificationRules; + return this; + } + + /** + * Get the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @return the resourceProviderAuthorizationRules value. + */ + public ResourceProviderAuthorizationRules resourceProviderAuthorizationRules() { + return this.resourceProviderAuthorizationRules; + } + + /** + * Set the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @param resourceProviderAuthorizationRules the resourceProviderAuthorizationRules value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withResourceProviderAuthorizationRules(ResourceProviderAuthorizationRules resourceProviderAuthorizationRules) { + this.resourceProviderAuthorizationRules = resourceProviderAuthorizationRules; + return this; + } + + /** + * Get the dstsConfiguration property: The dsts configuration. + * + * @return the dstsConfiguration value. + */ + public ResourceProviderManifestPropertiesDstsConfiguration dstsConfiguration() { + return this.dstsConfiguration; + } + + /** + * Set the dstsConfiguration property: The dsts configuration. + * + * @param dstsConfiguration the dstsConfiguration value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withDstsConfiguration(ResourceProviderManifestPropertiesDstsConfiguration dstsConfiguration) { + this.dstsConfiguration = dstsConfiguration; + return this; + } + + /** + * Get the notificationOptions property: Notification options. + * + * @return the notificationOptions value. + */ + public NotificationOptions notificationOptions() { + return this.notificationOptions; + } + + /** + * Set the notificationOptions property: Notification options. + * + * @param notificationOptions the notificationOptions value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withNotificationOptions(NotificationOptions notificationOptions) { + this.notificationOptions = notificationOptions; + return this; + } + + /** + * Get the resourceHydrationAccounts property: resource hydration accounts. + * + * @return the resourceHydrationAccounts value. + */ + public List resourceHydrationAccounts() { + return this.resourceHydrationAccounts; + } + + /** + * Set the resourceHydrationAccounts property: resource hydration accounts. + * + * @param resourceHydrationAccounts the resourceHydrationAccounts value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withResourceHydrationAccounts(List resourceHydrationAccounts) { + this.resourceHydrationAccounts = resourceHydrationAccounts; + return this; + } + + /** + * Get the notificationSettings property: Notification settings. + * + * @return the notificationSettings value. + */ + public ResourceProviderManifestPropertiesNotificationSettings notificationSettings() { + return this.notificationSettings; + } + + /** + * Set the notificationSettings property: Notification settings. + * + * @param notificationSettings the notificationSettings value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withNotificationSettings(ResourceProviderManifestPropertiesNotificationSettings notificationSettings) { + this.notificationSettings = notificationSettings; + return this; + } + + /** + * Get the managementGroupGlobalNotificationEndpoints property: Management groups global notification endpoints. + * + * @return the managementGroupGlobalNotificationEndpoints value. + */ + public List managementGroupGlobalNotificationEndpoints() { + return this.managementGroupGlobalNotificationEndpoints; + } + + /** + * Set the managementGroupGlobalNotificationEndpoints property: Management groups global notification endpoints. + * + * @param managementGroupGlobalNotificationEndpoints the managementGroupGlobalNotificationEndpoints value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withManagementGroupGlobalNotificationEndpoints( + List managementGroupGlobalNotificationEndpoints) { + this.managementGroupGlobalNotificationEndpoints = managementGroupGlobalNotificationEndpoints; + return this; + } + + /** + * Get the optionalFeatures property: Optional features. + * + * @return the optionalFeatures value. + */ + public List optionalFeatures() { + return this.optionalFeatures; + } + + /** + * Set the optionalFeatures property: Optional features. + * + * @param optionalFeatures the optionalFeatures value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withOptionalFeatures(List optionalFeatures) { + this.optionalFeatures = optionalFeatures; + return this; + } + + /** + * Get the resourceGroupLockOptionDuringMove property: Resource group lock option during move. + * + * @return the resourceGroupLockOptionDuringMove value. + */ + public ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove() { + return this.resourceGroupLockOptionDuringMove; + } + + /** + * Set the resourceGroupLockOptionDuringMove property: Resource group lock option during move. + * + * @param resourceGroupLockOptionDuringMove the resourceGroupLockOptionDuringMove value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withResourceGroupLockOptionDuringMove( + ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove resourceGroupLockOptionDuringMove) { + this.resourceGroupLockOptionDuringMove = resourceGroupLockOptionDuringMove; + return this; + } + + /** + * Get the responseOptions property: Response options. + * + * @return the responseOptions value. + */ + public ResourceProviderManifestPropertiesResponseOptions responseOptions() { + return this.responseOptions; + } + + /** + * Set the responseOptions property: Response options. + * + * @param responseOptions the responseOptions value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties + withResponseOptions(ResourceProviderManifestPropertiesResponseOptions responseOptions) { + this.responseOptions = responseOptions; + return this; + } + + /** + * Get the legacyNamespace property: Legacy namespace. + * + * @return the legacyNamespace value. + */ + public String legacyNamespace() { + return this.legacyNamespace; + } + + /** + * Set the legacyNamespace property: Legacy namespace. + * + * @param legacyNamespace the legacyNamespace value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withLegacyNamespace(String legacyNamespace) { + this.legacyNamespace = legacyNamespace; + return this; + } + + /** + * Get the legacyRegistrations property: Legacy registrations. + * + * @return the legacyRegistrations value. + */ + public List legacyRegistrations() { + return this.legacyRegistrations; + } + + /** + * Set the legacyRegistrations property: Legacy registrations. + * + * @param legacyRegistrations the legacyRegistrations value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withLegacyRegistrations(List legacyRegistrations) { + this.legacyRegistrations = legacyRegistrations; + return this; + } + + /** + * Get the customManifestVersion property: Custom manifest version. + * + * @return the customManifestVersion value. + */ + public String customManifestVersion() { + return this.customManifestVersion; + } + + /** + * Set the customManifestVersion property: Custom manifest version. + * + * @param customManifestVersion the customManifestVersion value to set. + * @return the ResourceProviderManifestProperties object itself. + */ + public ResourceProviderManifestProperties withCustomManifestVersion(String customManifestVersion) { + this.customManifestVersion = customManifestVersion; + return this; + } + /** * Validates the instance. * @@ -340,6 +826,9 @@ public void validate() { if (providerAuthorizations() != null) { providerAuthorizations().forEach(e -> e.validate()); } + if (services() != null) { + services().forEach(e -> e.validate()); + } if (featuresRule() != null) { featuresRule().validate(); } @@ -355,6 +844,36 @@ public void validate() { if (templateDeploymentOptions() != null) { templateDeploymentOptions().validate(); } + if (globalNotificationEndpoints() != null) { + globalNotificationEndpoints().forEach(e -> e.validate()); + } + if (notifications() != null) { + notifications().forEach(e -> e.validate()); + } + if (linkedNotificationRules() != null) { + linkedNotificationRules().forEach(e -> e.validate()); + } + if (resourceProviderAuthorizationRules() != null) { + resourceProviderAuthorizationRules().validate(); + } + if (dstsConfiguration() != null) { + dstsConfiguration().validate(); + } + if (resourceHydrationAccounts() != null) { + resourceHydrationAccounts().forEach(e -> e.validate()); + } + if (notificationSettings() != null) { + notificationSettings().validate(); + } + if (managementGroupGlobalNotificationEndpoints() != null) { + managementGroupGlobalNotificationEndpoints().forEach(e -> e.validate()); + } + if (resourceGroupLockOptionDuringMove() != null) { + resourceGroupLockOptionDuringMove().validate(); + } + if (responseOptions() != null) { + responseOptions().validate(); + } } /** @@ -367,6 +886,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("providerAuthorizations", this.providerAuthorizations, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("namespace", this.namespace); + jsonWriter.writeArrayField("services", this.services, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("serviceName", this.serviceName); jsonWriter.writeStringField("providerVersion", this.providerVersion); jsonWriter.writeStringField("providerType", this.providerType == null ? null : this.providerType.toString()); jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, @@ -375,8 +896,33 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("requestHeaderOptions", this.requestHeaderOptions); jsonWriter.writeJsonField("management", this.management); jsonWriter.writeArrayField("capabilities", this.capabilities, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("crossTenantTokenValidation", + this.crossTenantTokenValidation == null ? null : this.crossTenantTokenValidation.toString()); jsonWriter.writeUntypedField("metadata", this.metadata); jsonWriter.writeJsonField("templateDeploymentOptions", this.templateDeploymentOptions); + jsonWriter.writeArrayField("globalNotificationEndpoints", this.globalNotificationEndpoints, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("enableTenantLinkedNotification", this.enableTenantLinkedNotification); + jsonWriter.writeArrayField("notifications", this.notifications, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("linkedNotificationRules", this.linkedNotificationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("resourceProviderAuthorizationRules", this.resourceProviderAuthorizationRules); + jsonWriter.writeJsonField("dstsConfiguration", this.dstsConfiguration); + jsonWriter.writeStringField("notificationOptions", + this.notificationOptions == null ? null : this.notificationOptions.toString()); + jsonWriter.writeArrayField("resourceHydrationAccounts", this.resourceHydrationAccounts, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("notificationSettings", this.notificationSettings); + jsonWriter.writeArrayField("managementGroupGlobalNotificationEndpoints", + this.managementGroupGlobalNotificationEndpoints, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("optionalFeatures", this.optionalFeatures, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("resourceGroupLockOptionDuringMove", this.resourceGroupLockOptionDuringMove); + jsonWriter.writeJsonField("responseOptions", this.responseOptions); + jsonWriter.writeStringField("legacyNamespace", this.legacyNamespace); + jsonWriter.writeArrayField("legacyRegistrations", this.legacyRegistrations, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("customManifestVersion", this.customManifestVersion); return jsonWriter.writeEndObject(); } @@ -405,6 +951,12 @@ public static ResourceProviderManifestProperties fromJson(JsonReader jsonReader) deserializedResourceProviderManifestProperties.providerAuthorizations = providerAuthorizations; } else if ("namespace".equals(fieldName)) { deserializedResourceProviderManifestProperties.namespace = reader.getString(); + } else if ("services".equals(fieldName)) { + List services + = reader.readArray(reader1 -> ResourceProviderService.fromJson(reader1)); + deserializedResourceProviderManifestProperties.services = services; + } else if ("serviceName".equals(fieldName)) { + deserializedResourceProviderManifestProperties.serviceName = reader.getString(); } else if ("providerVersion".equals(fieldName)) { deserializedResourceProviderManifestProperties.providerVersion = reader.getString(); } else if ("providerType".equals(fieldName)) { @@ -426,11 +978,67 @@ public static ResourceProviderManifestProperties fromJson(JsonReader jsonReader) List capabilities = reader.readArray(reader1 -> ResourceProviderCapabilities.fromJson(reader1)); deserializedResourceProviderManifestProperties.capabilities = capabilities; + } else if ("crossTenantTokenValidation".equals(fieldName)) { + deserializedResourceProviderManifestProperties.crossTenantTokenValidation + = CrossTenantTokenValidation.fromString(reader.getString()); } else if ("metadata".equals(fieldName)) { deserializedResourceProviderManifestProperties.metadata = reader.readUntyped(); } else if ("templateDeploymentOptions".equals(fieldName)) { deserializedResourceProviderManifestProperties.templateDeploymentOptions = ResourceProviderManifestPropertiesTemplateDeploymentOptions.fromJson(reader); + } else if ("globalNotificationEndpoints".equals(fieldName)) { + List globalNotificationEndpoints + = reader.readArray(reader1 -> ResourceProviderEndpoint.fromJson(reader1)); + deserializedResourceProviderManifestProperties.globalNotificationEndpoints + = globalNotificationEndpoints; + } else if ("enableTenantLinkedNotification".equals(fieldName)) { + deserializedResourceProviderManifestProperties.enableTenantLinkedNotification + = reader.getNullable(JsonReader::getBoolean); + } else if ("notifications".equals(fieldName)) { + List notifications = reader.readArray(reader1 -> Notification.fromJson(reader1)); + deserializedResourceProviderManifestProperties.notifications = notifications; + } else if ("linkedNotificationRules".equals(fieldName)) { + List linkedNotificationRules + = reader.readArray(reader1 -> FanoutLinkedNotificationRule.fromJson(reader1)); + deserializedResourceProviderManifestProperties.linkedNotificationRules = linkedNotificationRules; + } else if ("resourceProviderAuthorizationRules".equals(fieldName)) { + deserializedResourceProviderManifestProperties.resourceProviderAuthorizationRules + = ResourceProviderAuthorizationRules.fromJson(reader); + } else if ("dstsConfiguration".equals(fieldName)) { + deserializedResourceProviderManifestProperties.dstsConfiguration + = ResourceProviderManifestPropertiesDstsConfiguration.fromJson(reader); + } else if ("notificationOptions".equals(fieldName)) { + deserializedResourceProviderManifestProperties.notificationOptions + = NotificationOptions.fromString(reader.getString()); + } else if ("resourceHydrationAccounts".equals(fieldName)) { + List resourceHydrationAccounts + = reader.readArray(reader1 -> ResourceHydrationAccount.fromJson(reader1)); + deserializedResourceProviderManifestProperties.resourceHydrationAccounts + = resourceHydrationAccounts; + } else if ("notificationSettings".equals(fieldName)) { + deserializedResourceProviderManifestProperties.notificationSettings + = ResourceProviderManifestPropertiesNotificationSettings.fromJson(reader); + } else if ("managementGroupGlobalNotificationEndpoints".equals(fieldName)) { + List managementGroupGlobalNotificationEndpoints + = reader.readArray(reader1 -> ResourceProviderEndpoint.fromJson(reader1)); + deserializedResourceProviderManifestProperties.managementGroupGlobalNotificationEndpoints + = managementGroupGlobalNotificationEndpoints; + } else if ("optionalFeatures".equals(fieldName)) { + List optionalFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestProperties.optionalFeatures = optionalFeatures; + } else if ("resourceGroupLockOptionDuringMove".equals(fieldName)) { + deserializedResourceProviderManifestProperties.resourceGroupLockOptionDuringMove + = ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.fromJson(reader); + } else if ("responseOptions".equals(fieldName)) { + deserializedResourceProviderManifestProperties.responseOptions + = ResourceProviderManifestPropertiesResponseOptions.fromJson(reader); + } else if ("legacyNamespace".equals(fieldName)) { + deserializedResourceProviderManifestProperties.legacyNamespace = reader.getString(); + } else if ("legacyRegistrations".equals(fieldName)) { + List legacyRegistrations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestProperties.legacyRegistrations = legacyRegistrations; + } else if ("customManifestVersion".equals(fieldName)) { + deserializedResourceProviderManifestProperties.customManifestVersion = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesDstsConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesDstsConfiguration.java new file mode 100644 index 000000000000..8b6acd8b1bc7 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesDstsConfiguration.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The dsts configuration. + */ +@Fluent +public final class ResourceProviderManifestPropertiesDstsConfiguration extends DstsConfiguration { + /** + * Creates an instance of ResourceProviderManifestPropertiesDstsConfiguration class. + */ + public ResourceProviderManifestPropertiesDstsConfiguration() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesDstsConfiguration withServiceName(String serviceName) { + super.withServiceName(serviceName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesDstsConfiguration withServiceDnsName(String serviceDnsName) { + super.withServiceDnsName(serviceDnsName); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (serviceName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceName in model ResourceProviderManifestPropertiesDstsConfiguration")); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(ResourceProviderManifestPropertiesDstsConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", serviceName()); + jsonWriter.writeStringField("serviceDnsName", serviceDnsName()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderManifestPropertiesDstsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderManifestPropertiesDstsConfiguration 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 ResourceProviderManifestPropertiesDstsConfiguration. + */ + public static ResourceProviderManifestPropertiesDstsConfiguration fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderManifestPropertiesDstsConfiguration deserializedResourceProviderManifestPropertiesDstsConfiguration + = new ResourceProviderManifestPropertiesDstsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesDstsConfiguration.withServiceName(reader.getString()); + } else if ("serviceDnsName".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesDstsConfiguration + .withServiceDnsName(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderManifestPropertiesDstsConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesFeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesFeaturesRule.java index acd8da047269..260b4d0286f5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesFeaturesRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesFeaturesRule.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ResourceProviderManifestPropertiesFeaturesRule model. + * The features rule. */ @Fluent public final class ResourceProviderManifestPropertiesFeaturesRule extends FeaturesRule { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesManagement.java index 2cd884f7a36a..e5e40b69390d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesManagement.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesManagement.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ResourceProviderManifestPropertiesManagement model. + * The resource provider management. */ @Fluent public final class ResourceProviderManifestPropertiesManagement extends ResourceProviderManagement { @@ -40,6 +40,15 @@ public ResourceProviderManifestPropertiesManagement withManifestOwners(List authorizationOwners) { + super.withAuthorizationOwners(authorizationOwners); + return this; + } + /** * {@inheritDoc} */ @@ -90,11 +99,69 @@ public ResourceProviderManifestPropertiesManagement withServiceTreeInfos(List resourceAccessRoles) { + public ResourceProviderManifestPropertiesManagement + withResourceAccessRoles(List resourceAccessRoles) { super.withResourceAccessRoles(resourceAccessRoles); return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesManagement + withExpeditedRolloutSubmitters(List expeditedRolloutSubmitters) { + super.withExpeditedRolloutSubmitters(expeditedRolloutSubmitters); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesManagement withErrorResponseMessageOptions( + ResourceProviderManagementErrorResponseMessageOptions errorResponseMessageOptions) { + super.withErrorResponseMessageOptions(errorResponseMessageOptions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesManagement + withExpeditedRolloutMetadata(ResourceProviderManagementExpeditedRolloutMetadata expeditedRolloutMetadata) { + super.withExpeditedRolloutMetadata(expeditedRolloutMetadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesManagement withCanaryManifestOwners(List canaryManifestOwners) { + super.withCanaryManifestOwners(canaryManifestOwners); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesManagement withPcCode(String pcCode) { + super.withPcCode(pcCode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesManagement withProfitCenterProgramId(String profitCenterProgramId) { + super.withProfitCenterProgramId(profitCenterProgramId); + return this; + } + /** * Validates the instance. * @@ -105,6 +172,15 @@ public void validate() { if (serviceTreeInfos() != null) { serviceTreeInfos().forEach(e -> e.validate()); } + if (resourceAccessRoles() != null) { + resourceAccessRoles().forEach(e -> e.validate()); + } + if (errorResponseMessageOptions() != null) { + errorResponseMessageOptions().validate(); + } + if (expeditedRolloutMetadata() != null) { + expeditedRolloutMetadata().validate(); + } } /** @@ -116,6 +192,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("schemaOwners", schemaOwners(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("manifestOwners", manifestOwners(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("authorizationOwners", authorizationOwners(), + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("incidentRoutingService", incidentRoutingService()); jsonWriter.writeStringField("incidentRoutingTeam", incidentRoutingTeam()); jsonWriter.writeStringField("incidentContactEmail", incidentContactEmail()); @@ -124,7 +202,15 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("resourceAccessPolicy", resourceAccessPolicy() == null ? null : resourceAccessPolicy().toString()); jsonWriter.writeArrayField("resourceAccessRoles", resourceAccessRoles(), - (writer, element) -> writer.writeUntyped(element)); + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("expeditedRolloutSubmitters", expeditedRolloutSubmitters(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("errorResponseMessageOptions", errorResponseMessageOptions()); + jsonWriter.writeJsonField("expeditedRolloutMetadata", expeditedRolloutMetadata()); + jsonWriter.writeArrayField("canaryManifestOwners", canaryManifestOwners(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("pcCode", pcCode()); + jsonWriter.writeStringField("profitCenterProgramId", profitCenterProgramId()); return jsonWriter.writeEndObject(); } @@ -150,6 +236,10 @@ public static ResourceProviderManifestPropertiesManagement fromJson(JsonReader j } else if ("manifestOwners".equals(fieldName)) { List manifestOwners = reader.readArray(reader1 -> reader1.getString()); deserializedResourceProviderManifestPropertiesManagement.withManifestOwners(manifestOwners); + } else if ("authorizationOwners".equals(fieldName)) { + List authorizationOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestPropertiesManagement + .withAuthorizationOwners(authorizationOwners); } else if ("incidentRoutingService".equals(fieldName)) { deserializedResourceProviderManifestPropertiesManagement .withIncidentRoutingService(reader.getString()); @@ -167,9 +257,29 @@ public static ResourceProviderManifestPropertiesManagement fromJson(JsonReader j deserializedResourceProviderManifestPropertiesManagement .withResourceAccessPolicy(ResourceAccessPolicy.fromString(reader.getString())); } else if ("resourceAccessRoles".equals(fieldName)) { - List resourceAccessRoles = reader.readArray(reader1 -> reader1.readUntyped()); + List resourceAccessRoles + = reader.readArray(reader1 -> ResourceAccessRole.fromJson(reader1)); deserializedResourceProviderManifestPropertiesManagement .withResourceAccessRoles(resourceAccessRoles); + } else if ("expeditedRolloutSubmitters".equals(fieldName)) { + List expeditedRolloutSubmitters = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestPropertiesManagement + .withExpeditedRolloutSubmitters(expeditedRolloutSubmitters); + } else if ("errorResponseMessageOptions".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesManagement.withErrorResponseMessageOptions( + ResourceProviderManagementErrorResponseMessageOptions.fromJson(reader)); + } else if ("expeditedRolloutMetadata".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesManagement.withExpeditedRolloutMetadata( + ResourceProviderManagementExpeditedRolloutMetadata.fromJson(reader)); + } else if ("canaryManifestOwners".equals(fieldName)) { + List canaryManifestOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceProviderManifestPropertiesManagement + .withCanaryManifestOwners(canaryManifestOwners); + } else if ("pcCode".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesManagement.withPcCode(reader.getString()); + } else if ("profitCenterProgramId".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesManagement + .withProfitCenterProgramId(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesNotificationSettings.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesNotificationSettings.java new file mode 100644 index 000000000000..ac478bee2ff2 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesNotificationSettings.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Notification settings. + */ +@Fluent +public final class ResourceProviderManifestPropertiesNotificationSettings + implements JsonSerializable { + /* + * The subscriberSettings property. + */ + private List subscriberSettings; + + /** + * Creates an instance of ResourceProviderManifestPropertiesNotificationSettings class. + */ + public ResourceProviderManifestPropertiesNotificationSettings() { + } + + /** + * Get the subscriberSettings property: The subscriberSettings property. + * + * @return the subscriberSettings value. + */ + public List subscriberSettings() { + return this.subscriberSettings; + } + + /** + * Set the subscriberSettings property: The subscriberSettings property. + * + * @param subscriberSettings the subscriberSettings value to set. + * @return the ResourceProviderManifestPropertiesNotificationSettings object itself. + */ + public ResourceProviderManifestPropertiesNotificationSettings + withSubscriberSettings(List subscriberSettings) { + this.subscriberSettings = subscriberSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subscriberSettings() != null) { + subscriberSettings().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("subscriberSettings", this.subscriberSettings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderManifestPropertiesNotificationSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderManifestPropertiesNotificationSettings 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 ResourceProviderManifestPropertiesNotificationSettings. + */ + public static ResourceProviderManifestPropertiesNotificationSettings fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderManifestPropertiesNotificationSettings deserializedResourceProviderManifestPropertiesNotificationSettings + = new ResourceProviderManifestPropertiesNotificationSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subscriberSettings".equals(fieldName)) { + List subscriberSettings + = reader.readArray(reader1 -> SubscriberSetting.fromJson(reader1)); + deserializedResourceProviderManifestPropertiesNotificationSettings.subscriberSettings + = subscriberSettings; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderManifestPropertiesNotificationSettings; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesProviderAuthentication.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesProviderAuthentication.java index 94741a0abdaa..e15ccb659382 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesProviderAuthentication.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesProviderAuthentication.java @@ -13,7 +13,7 @@ import java.util.List; /** - * The ResourceProviderManifestPropertiesProviderAuthentication model. + * The provider authentication. */ @Fluent public final class ResourceProviderManifestPropertiesProviderAuthentication extends ResourceProviderAuthentication { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesRequestHeaderOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesRequestHeaderOptions.java index 35c10e19f6f1..275d929ba60c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesRequestHeaderOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesRequestHeaderOptions.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceProviderManifestPropertiesRequestHeaderOptions model. + * The request header options. */ @Fluent public final class ResourceProviderManifestPropertiesRequestHeaderOptions extends RequestHeaderOptions { @@ -30,6 +30,15 @@ public ResourceProviderManifestPropertiesRequestHeaderOptions withOptInHeaders(O return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestPropertiesRequestHeaderOptions withOptOutHeaders(OptOutHeaderType optOutHeaders) { + super.withOptOutHeaders(optOutHeaders); + return this; + } + /** * Validates the instance. * @@ -46,6 +55,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("optInHeaders", optInHeaders() == null ? null : optInHeaders().toString()); + jsonWriter.writeStringField("optOutHeaders", optOutHeaders() == null ? null : optOutHeaders().toString()); return jsonWriter.writeEndObject(); } @@ -69,6 +79,9 @@ public static ResourceProviderManifestPropertiesRequestHeaderOptions fromJson(Js if ("optInHeaders".equals(fieldName)) { deserializedResourceProviderManifestPropertiesRequestHeaderOptions .withOptInHeaders(OptInHeaderType.fromString(reader.getString())); + } else if ("optOutHeaders".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesRequestHeaderOptions + .withOptOutHeaders(OptOutHeaderType.fromString(reader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.java new file mode 100644 index 000000000000..e7d64cc7345e --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resource group lock option during move. + */ +@Fluent +public final class ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + implements JsonSerializable { + /* + * The action verb that will be blocked when the resource group is locked during move. + */ + private BlockActionVerb blockActionVerb; + + /** + * Creates an instance of ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove class. + */ + public ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove() { + } + + /** + * Get the blockActionVerb property: The action verb that will be blocked when the resource group is locked during + * move. + * + * @return the blockActionVerb value. + */ + public BlockActionVerb blockActionVerb() { + return this.blockActionVerb; + } + + /** + * Set the blockActionVerb property: The action verb that will be blocked when the resource group is locked during + * move. + * + * @param blockActionVerb the blockActionVerb value to set. + * @return the ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove object itself. + */ + public ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + withBlockActionVerb(BlockActionVerb blockActionVerb) { + this.blockActionVerb = blockActionVerb; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("blockActionVerb", + this.blockActionVerb == null ? null : this.blockActionVerb.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove 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 + * ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove. + */ + public static ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove deserializedResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + = new ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("blockActionVerb".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove.blockActionVerb + = BlockActionVerb.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResponseOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResponseOptions.java new file mode 100644 index 000000000000..30d44d73235e --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesResponseOptions.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Response options. + */ +@Fluent +public final class ResourceProviderManifestPropertiesResponseOptions + implements JsonSerializable { + /* + * The serviceClientOptionsType property. + */ + private ServiceClientOptionsType serviceClientOptionsType; + + /** + * Creates an instance of ResourceProviderManifestPropertiesResponseOptions class. + */ + public ResourceProviderManifestPropertiesResponseOptions() { + } + + /** + * Get the serviceClientOptionsType property: The serviceClientOptionsType property. + * + * @return the serviceClientOptionsType value. + */ + public ServiceClientOptionsType serviceClientOptionsType() { + return this.serviceClientOptionsType; + } + + /** + * Set the serviceClientOptionsType property: The serviceClientOptionsType property. + * + * @param serviceClientOptionsType the serviceClientOptionsType value to set. + * @return the ResourceProviderManifestPropertiesResponseOptions object itself. + */ + public ResourceProviderManifestPropertiesResponseOptions + withServiceClientOptionsType(ServiceClientOptionsType serviceClientOptionsType) { + this.serviceClientOptionsType = serviceClientOptionsType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceClientOptionsType", + this.serviceClientOptionsType == null ? null : this.serviceClientOptionsType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderManifestPropertiesResponseOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderManifestPropertiesResponseOptions 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 ResourceProviderManifestPropertiesResponseOptions. + */ + public static ResourceProviderManifestPropertiesResponseOptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderManifestPropertiesResponseOptions deserializedResourceProviderManifestPropertiesResponseOptions + = new ResourceProviderManifestPropertiesResponseOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceClientOptionsType".equals(fieldName)) { + deserializedResourceProviderManifestPropertiesResponseOptions.serviceClientOptionsType + = ServiceClientOptionsType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderManifestPropertiesResponseOptions; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesTemplateDeploymentOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesTemplateDeploymentOptions.java index c395bc493035..c2d77adfaa36 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesTemplateDeploymentOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestPropertiesTemplateDeploymentOptions.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ResourceProviderManifestPropertiesTemplateDeploymentOptions model. + * The template deployment options. */ @Fluent public final class ResourceProviderManifestPropertiesTemplateDeploymentOptions extends TemplateDeploymentOptions { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProviderAuthentication.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProviderAuthentication.java index e8da66926b77..2a703e471fa7 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProviderAuthentication.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestProviderAuthentication.java @@ -13,7 +13,7 @@ import java.util.List; /** - * The ResourceProviderManifestProviderAuthentication model. + * The provider authentication. */ @Fluent public final class ResourceProviderManifestProviderAuthentication extends ResourceProviderAuthentication { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestReRegisterSubscriptionMetadata.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestReRegisterSubscriptionMetadata.java index 0d65d207a1df..e73a8de6d115 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestReRegisterSubscriptionMetadata.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestReRegisterSubscriptionMetadata.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceProviderManifestReRegisterSubscriptionMetadata model. + * The re-register subscription metadata. */ @Fluent public final class ResourceProviderManifestReRegisterSubscriptionMetadata extends ReRegisterSubscriptionMetadata { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestRequestHeaderOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestRequestHeaderOptions.java index 71fad17e3d57..c72c29fd254f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestRequestHeaderOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderManifestRequestHeaderOptions.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceProviderManifestRequestHeaderOptions model. + * The request header options. */ @Fluent public final class ResourceProviderManifestRequestHeaderOptions extends RequestHeaderOptions { @@ -30,6 +30,15 @@ public ResourceProviderManifestRequestHeaderOptions withOptInHeaders(OptInHeader return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceProviderManifestRequestHeaderOptions withOptOutHeaders(OptOutHeaderType optOutHeaders) { + super.withOptOutHeaders(optOutHeaders); + return this; + } + /** * Validates the instance. * @@ -46,6 +55,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("optInHeaders", optInHeaders() == null ? null : optInHeaders().toString()); + jsonWriter.writeStringField("optOutHeaders", optOutHeaders() == null ? null : optOutHeaders().toString()); return jsonWriter.writeEndObject(); } @@ -68,6 +78,9 @@ public static ResourceProviderManifestRequestHeaderOptions fromJson(JsonReader j if ("optInHeaders".equals(fieldName)) { deserializedResourceProviderManifestRequestHeaderOptions .withOptInHeaders(OptInHeaderType.fromString(reader.getString())); + } else if ("optOutHeaders".equals(fieldName)) { + deserializedResourceProviderManifestRequestHeaderOptions + .withOptOutHeaders(OptOutHeaderType.fromString(reader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderService.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderService.java new file mode 100644 index 000000000000..90f21b397b24 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderService.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resource provider service. + */ +@Fluent +public final class ResourceProviderService implements JsonSerializable { + /* + * The service name. + */ + private String serviceName; + + /* + * The status. + */ + private ServiceStatus status; + + /** + * Creates an instance of ResourceProviderService class. + */ + public ResourceProviderService() { + } + + /** + * Get the serviceName property: The service name. + * + * @return the serviceName value. + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the serviceName property: The service name. + * + * @param serviceName the serviceName value to set. + * @return the ResourceProviderService object itself. + */ + public ResourceProviderService withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the status property: The status. + * + * @return the status value. + */ + public ServiceStatus status() { + return this.status; + } + + /** + * Set the status property: The status. + * + * @param status the status value to set. + * @return the ResourceProviderService object itself. + */ + public ResourceProviderService withStatus(ServiceStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", this.serviceName); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceProviderService from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceProviderService 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 ResourceProviderService. + */ + public static ResourceProviderService fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceProviderService deserializedResourceProviderService = new ResourceProviderService(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedResourceProviderService.serviceName = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedResourceProviderService.status = ServiceStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceProviderService; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderType.java index 4e0862f80064..c915b9fad4b5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceProviderType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ResourceProviderType. + * The provider type. */ public final class ResourceProviderType extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceSubType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceSubType.java new file mode 100644 index 000000000000..71d7784dd52f --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceSubType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The resource sub type. + */ +public final class ResourceSubType extends ExpandableStringEnum { + /** + * Static value NotSpecified for ResourceSubType. + */ + public static final ResourceSubType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value AsyncOperation for ResourceSubType. + */ + public static final ResourceSubType ASYNC_OPERATION = fromString("AsyncOperation"); + + /** + * Creates a new instance of ResourceSubType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSubType() { + } + + /** + * Creates or finds a ResourceSubType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSubType. + */ + public static ResourceSubType fromString(String name) { + return fromString(name, ResourceSubType.class); + } + + /** + * Gets known ResourceSubType values. + * + * @return known ResourceSubType values. + */ + public static Collection values() { + return values(ResourceSubType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceType.java index d2fffe37af70..1e0d7f6ac36e 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceType.java @@ -18,125 +18,160 @@ @Fluent public final class ResourceType implements JsonSerializable { /* - * The name property. + * The resource type name. */ private String name; /* - * The routingType property. + * The resource routing type. */ private RoutingType routingType; /* - * The resourceValidation property. + * The additional options. + */ + private AdditionalOptions additionalOptions; + + /* + * The cross tenant token validation. + */ + private CrossTenantTokenValidation crossTenantTokenValidation; + + /* + * The resource validation. */ private ResourceValidation resourceValidation; /* - * The allowedUnauthorizedActions property. + * The allowed unauthorized actions. */ private List allowedUnauthorizedActions; /* - * The authorizationActionMappings property. + * The allowed unauthorized actions extensions. + */ + private List allowedUnauthorizedActionsExtensions; + + /* + * The authorization action mappings. */ private List authorizationActionMappings; /* - * The linkedAccessChecks property. + * The linked access checks. */ private List linkedAccessChecks; /* - * The defaultApiVersion property. + * The default api version. */ private String defaultApiVersion; /* - * The loggingRules property. + * The logging rules. */ private List loggingRules; /* - * The throttlingRules property. + * The throttling rules. */ private List throttlingRules; /* - * The endpoints property. + * The endpoints. */ private List endpoints; /* - * The marketplaceType property. + * The marketplace type. */ private MarketplaceType marketplaceType; /* - * The identityManagement property. + * The identity management. */ private ResourceTypeIdentityManagement identityManagement; /* - * Anything + * The metadata. */ private Object metadata; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; /* - * The featuresRule property. + * The features rule. */ private ResourceTypeFeaturesRule featuresRule; /* - * The subscriptionStateRules property. + * The subscription state rules. */ private List subscriptionStateRules; /* - * The serviceTreeInfos property. + * The service tree infos. */ private List serviceTreeInfos; /* - * The requestHeaderOptions property. + * The request header options. */ private ResourceTypeRequestHeaderOptions requestHeaderOptions; /* - * The skuLink property. + * The sku link. */ private String skuLink; /* - * The disallowedActionVerbs property. + * The disallowed action verbs. */ private List disallowedActionVerbs; /* - * The templateDeploymentPolicy property. + * The template deployment policy. */ private ResourceTypeTemplateDeploymentPolicy templateDeploymentPolicy; /* - * The extendedLocations property. + * The extended locations. */ private List extendedLocations; /* - * The linkedOperationRules property. + * The linked operation rules. */ private List linkedOperationRules; /* - * The resourceDeletionPolicy property. + * The resource deletion policy. */ private ManifestResourceDeletionPolicy resourceDeletionPolicy; + /* + * The quota rule. + */ + private QuotaRule quotaRule; + + /* + * The notifications. + */ + private List notifications; + + /* + * The linked notification rules. + */ + private List linkedNotificationRules; + + /* + * The resource provider authorization rules. + */ + private ResourceProviderAuthorizationRules resourceProviderAuthorizationRules; + /** * Creates an instance of ResourceType class. */ @@ -144,7 +179,7 @@ public ResourceType() { } /** - * Get the name property: The name property. + * Get the name property: The resource type name. * * @return the name value. */ @@ -153,7 +188,7 @@ public String name() { } /** - * Set the name property: The name property. + * Set the name property: The resource type name. * * @param name the name value to set. * @return the ResourceType object itself. @@ -164,7 +199,7 @@ public ResourceType withName(String name) { } /** - * Get the routingType property: The routingType property. + * Get the routingType property: The resource routing type. * * @return the routingType value. */ @@ -173,7 +208,7 @@ public RoutingType routingType() { } /** - * Set the routingType property: The routingType property. + * Set the routingType property: The resource routing type. * * @param routingType the routingType value to set. * @return the ResourceType object itself. @@ -184,7 +219,47 @@ public ResourceType withRoutingType(RoutingType routingType) { } /** - * Get the resourceValidation property: The resourceValidation property. + * Get the additionalOptions property: The additional options. + * + * @return the additionalOptions value. + */ + public AdditionalOptions additionalOptions() { + return this.additionalOptions; + } + + /** + * Set the additionalOptions property: The additional options. + * + * @param additionalOptions the additionalOptions value to set. + * @return the ResourceType object itself. + */ + public ResourceType withAdditionalOptions(AdditionalOptions additionalOptions) { + this.additionalOptions = additionalOptions; + return this; + } + + /** + * Get the crossTenantTokenValidation property: The cross tenant token validation. + * + * @return the crossTenantTokenValidation value. + */ + public CrossTenantTokenValidation crossTenantTokenValidation() { + return this.crossTenantTokenValidation; + } + + /** + * Set the crossTenantTokenValidation property: The cross tenant token validation. + * + * @param crossTenantTokenValidation the crossTenantTokenValidation value to set. + * @return the ResourceType object itself. + */ + public ResourceType withCrossTenantTokenValidation(CrossTenantTokenValidation crossTenantTokenValidation) { + this.crossTenantTokenValidation = crossTenantTokenValidation; + return this; + } + + /** + * Get the resourceValidation property: The resource validation. * * @return the resourceValidation value. */ @@ -193,7 +268,7 @@ public ResourceValidation resourceValidation() { } /** - * Set the resourceValidation property: The resourceValidation property. + * Set the resourceValidation property: The resource validation. * * @param resourceValidation the resourceValidation value to set. * @return the ResourceType object itself. @@ -204,7 +279,7 @@ public ResourceType withResourceValidation(ResourceValidation resourceValidation } /** - * Get the allowedUnauthorizedActions property: The allowedUnauthorizedActions property. + * Get the allowedUnauthorizedActions property: The allowed unauthorized actions. * * @return the allowedUnauthorizedActions value. */ @@ -213,7 +288,7 @@ public List allowedUnauthorizedActions() { } /** - * Set the allowedUnauthorizedActions property: The allowedUnauthorizedActions property. + * Set the allowedUnauthorizedActions property: The allowed unauthorized actions. * * @param allowedUnauthorizedActions the allowedUnauthorizedActions value to set. * @return the ResourceType object itself. @@ -224,7 +299,28 @@ public ResourceType withAllowedUnauthorizedActions(List allowedUnauthori } /** - * Get the authorizationActionMappings property: The authorizationActionMappings property. + * Get the allowedUnauthorizedActionsExtensions property: The allowed unauthorized actions extensions. + * + * @return the allowedUnauthorizedActionsExtensions value. + */ + public List allowedUnauthorizedActionsExtensions() { + return this.allowedUnauthorizedActionsExtensions; + } + + /** + * Set the allowedUnauthorizedActionsExtensions property: The allowed unauthorized actions extensions. + * + * @param allowedUnauthorizedActionsExtensions the allowedUnauthorizedActionsExtensions value to set. + * @return the ResourceType object itself. + */ + public ResourceType withAllowedUnauthorizedActionsExtensions( + List allowedUnauthorizedActionsExtensions) { + this.allowedUnauthorizedActionsExtensions = allowedUnauthorizedActionsExtensions; + return this; + } + + /** + * Get the authorizationActionMappings property: The authorization action mappings. * * @return the authorizationActionMappings value. */ @@ -233,7 +329,7 @@ public List authorizationActionMappings() { } /** - * Set the authorizationActionMappings property: The authorizationActionMappings property. + * Set the authorizationActionMappings property: The authorization action mappings. * * @param authorizationActionMappings the authorizationActionMappings value to set. * @return the ResourceType object itself. @@ -244,7 +340,7 @@ public ResourceType withAuthorizationActionMappings(List linkedAccessChecks() { } /** - * Set the linkedAccessChecks property: The linkedAccessChecks property. + * Set the linkedAccessChecks property: The linked access checks. * * @param linkedAccessChecks the linkedAccessChecks value to set. * @return the ResourceType object itself. @@ -264,7 +360,7 @@ public ResourceType withLinkedAccessChecks(List linkedAccessC } /** - * Get the defaultApiVersion property: The defaultApiVersion property. + * Get the defaultApiVersion property: The default api version. * * @return the defaultApiVersion value. */ @@ -273,7 +369,7 @@ public String defaultApiVersion() { } /** - * Set the defaultApiVersion property: The defaultApiVersion property. + * Set the defaultApiVersion property: The default api version. * * @param defaultApiVersion the defaultApiVersion value to set. * @return the ResourceType object itself. @@ -284,7 +380,7 @@ public ResourceType withDefaultApiVersion(String defaultApiVersion) { } /** - * Get the loggingRules property: The loggingRules property. + * Get the loggingRules property: The logging rules. * * @return the loggingRules value. */ @@ -293,7 +389,7 @@ public List loggingRules() { } /** - * Set the loggingRules property: The loggingRules property. + * Set the loggingRules property: The logging rules. * * @param loggingRules the loggingRules value to set. * @return the ResourceType object itself. @@ -304,7 +400,7 @@ public ResourceType withLoggingRules(List loggingRules) { } /** - * Get the throttlingRules property: The throttlingRules property. + * Get the throttlingRules property: The throttling rules. * * @return the throttlingRules value. */ @@ -313,7 +409,7 @@ public List throttlingRules() { } /** - * Set the throttlingRules property: The throttlingRules property. + * Set the throttlingRules property: The throttling rules. * * @param throttlingRules the throttlingRules value to set. * @return the ResourceType object itself. @@ -324,7 +420,7 @@ public ResourceType withThrottlingRules(List throttlingRules) { } /** - * Get the endpoints property: The endpoints property. + * Get the endpoints property: The endpoints. * * @return the endpoints value. */ @@ -333,7 +429,7 @@ public List endpoints() { } /** - * Set the endpoints property: The endpoints property. + * Set the endpoints property: The endpoints. * * @param endpoints the endpoints value to set. * @return the ResourceType object itself. @@ -344,7 +440,7 @@ public ResourceType withEndpoints(List endpoints) { } /** - * Get the marketplaceType property: The marketplaceType property. + * Get the marketplaceType property: The marketplace type. * * @return the marketplaceType value. */ @@ -353,7 +449,7 @@ public MarketplaceType marketplaceType() { } /** - * Set the marketplaceType property: The marketplaceType property. + * Set the marketplaceType property: The marketplace type. * * @param marketplaceType the marketplaceType value to set. * @return the ResourceType object itself. @@ -364,7 +460,7 @@ public ResourceType withMarketplaceType(MarketplaceType marketplaceType) { } /** - * Get the identityManagement property: The identityManagement property. + * Get the identityManagement property: The identity management. * * @return the identityManagement value. */ @@ -373,7 +469,7 @@ public ResourceTypeIdentityManagement identityManagement() { } /** - * Set the identityManagement property: The identityManagement property. + * Set the identityManagement property: The identity management. * * @param identityManagement the identityManagement value to set. * @return the ResourceType object itself. @@ -384,7 +480,7 @@ public ResourceType withIdentityManagement(ResourceTypeIdentityManagement identi } /** - * Get the metadata property: Anything. + * Get the metadata property: The metadata. * * @return the metadata value. */ @@ -393,7 +489,7 @@ public Object metadata() { } /** - * Set the metadata property: Anything. + * Set the metadata property: The metadata. * * @param metadata the metadata value to set. * @return the ResourceType object itself. @@ -404,7 +500,7 @@ public ResourceType withMetadata(Object metadata) { } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -413,7 +509,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the ResourceType object itself. @@ -424,7 +520,7 @@ public ResourceType withRequiredFeatures(List requiredFeatures) { } /** - * Get the featuresRule property: The featuresRule property. + * Get the featuresRule property: The features rule. * * @return the featuresRule value. */ @@ -433,7 +529,7 @@ public ResourceTypeFeaturesRule featuresRule() { } /** - * Set the featuresRule property: The featuresRule property. + * Set the featuresRule property: The features rule. * * @param featuresRule the featuresRule value to set. * @return the ResourceType object itself. @@ -444,7 +540,7 @@ public ResourceType withFeaturesRule(ResourceTypeFeaturesRule featuresRule) { } /** - * Get the subscriptionStateRules property: The subscriptionStateRules property. + * Get the subscriptionStateRules property: The subscription state rules. * * @return the subscriptionStateRules value. */ @@ -453,7 +549,7 @@ public List subscriptionStateRules() { } /** - * Set the subscriptionStateRules property: The subscriptionStateRules property. + * Set the subscriptionStateRules property: The subscription state rules. * * @param subscriptionStateRules the subscriptionStateRules value to set. * @return the ResourceType object itself. @@ -464,7 +560,7 @@ public ResourceType withSubscriptionStateRules(List subsc } /** - * Get the serviceTreeInfos property: The serviceTreeInfos property. + * Get the serviceTreeInfos property: The service tree infos. * * @return the serviceTreeInfos value. */ @@ -473,7 +569,7 @@ public List serviceTreeInfos() { } /** - * Set the serviceTreeInfos property: The serviceTreeInfos property. + * Set the serviceTreeInfos property: The service tree infos. * * @param serviceTreeInfos the serviceTreeInfos value to set. * @return the ResourceType object itself. @@ -484,7 +580,7 @@ public ResourceType withServiceTreeInfos(List serviceTreeInfos) } /** - * Get the requestHeaderOptions property: The requestHeaderOptions property. + * Get the requestHeaderOptions property: The request header options. * * @return the requestHeaderOptions value. */ @@ -493,7 +589,7 @@ public ResourceTypeRequestHeaderOptions requestHeaderOptions() { } /** - * Set the requestHeaderOptions property: The requestHeaderOptions property. + * Set the requestHeaderOptions property: The request header options. * * @param requestHeaderOptions the requestHeaderOptions value to set. * @return the ResourceType object itself. @@ -504,7 +600,7 @@ public ResourceType withRequestHeaderOptions(ResourceTypeRequestHeaderOptions re } /** - * Get the skuLink property: The skuLink property. + * Get the skuLink property: The sku link. * * @return the skuLink value. */ @@ -513,7 +609,7 @@ public String skuLink() { } /** - * Set the skuLink property: The skuLink property. + * Set the skuLink property: The sku link. * * @param skuLink the skuLink value to set. * @return the ResourceType object itself. @@ -524,7 +620,7 @@ public ResourceType withSkuLink(String skuLink) { } /** - * Get the disallowedActionVerbs property: The disallowedActionVerbs property. + * Get the disallowedActionVerbs property: The disallowed action verbs. * * @return the disallowedActionVerbs value. */ @@ -533,7 +629,7 @@ public List disallowedActionVerbs() { } /** - * Set the disallowedActionVerbs property: The disallowedActionVerbs property. + * Set the disallowedActionVerbs property: The disallowed action verbs. * * @param disallowedActionVerbs the disallowedActionVerbs value to set. * @return the ResourceType object itself. @@ -544,7 +640,7 @@ public ResourceType withDisallowedActionVerbs(List disallowedActionVerbs } /** - * Get the templateDeploymentPolicy property: The templateDeploymentPolicy property. + * Get the templateDeploymentPolicy property: The template deployment policy. * * @return the templateDeploymentPolicy value. */ @@ -553,7 +649,7 @@ public ResourceTypeTemplateDeploymentPolicy templateDeploymentPolicy() { } /** - * Set the templateDeploymentPolicy property: The templateDeploymentPolicy property. + * Set the templateDeploymentPolicy property: The template deployment policy. * * @param templateDeploymentPolicy the templateDeploymentPolicy value to set. * @return the ResourceType object itself. @@ -564,7 +660,7 @@ public ResourceType withTemplateDeploymentPolicy(ResourceTypeTemplateDeploymentP } /** - * Get the extendedLocations property: The extendedLocations property. + * Get the extendedLocations property: The extended locations. * * @return the extendedLocations value. */ @@ -573,7 +669,7 @@ public List extendedLocations() { } /** - * Set the extendedLocations property: The extendedLocations property. + * Set the extendedLocations property: The extended locations. * * @param extendedLocations the extendedLocations value to set. * @return the ResourceType object itself. @@ -584,7 +680,7 @@ public ResourceType withExtendedLocations(List extended } /** - * Get the linkedOperationRules property: The linkedOperationRules property. + * Get the linkedOperationRules property: The linked operation rules. * * @return the linkedOperationRules value. */ @@ -593,7 +689,7 @@ public List linkedOperationRules() { } /** - * Set the linkedOperationRules property: The linkedOperationRules property. + * Set the linkedOperationRules property: The linked operation rules. * * @param linkedOperationRules the linkedOperationRules value to set. * @return the ResourceType object itself. @@ -604,7 +700,7 @@ public ResourceType withLinkedOperationRules(List linkedOpe } /** - * Get the resourceDeletionPolicy property: The resourceDeletionPolicy property. + * Get the resourceDeletionPolicy property: The resource deletion policy. * * @return the resourceDeletionPolicy value. */ @@ -613,7 +709,7 @@ public ManifestResourceDeletionPolicy resourceDeletionPolicy() { } /** - * Set the resourceDeletionPolicy property: The resourceDeletionPolicy property. + * Set the resourceDeletionPolicy property: The resource deletion policy. * * @param resourceDeletionPolicy the resourceDeletionPolicy value to set. * @return the ResourceType object itself. @@ -623,12 +719,96 @@ public ResourceType withResourceDeletionPolicy(ManifestResourceDeletionPolicy re return this; } + /** + * Get the quotaRule property: The quota rule. + * + * @return the quotaRule value. + */ + public QuotaRule quotaRule() { + return this.quotaRule; + } + + /** + * Set the quotaRule property: The quota rule. + * + * @param quotaRule the quotaRule value to set. + * @return the ResourceType object itself. + */ + public ResourceType withQuotaRule(QuotaRule quotaRule) { + this.quotaRule = quotaRule; + return this; + } + + /** + * Get the notifications property: The notifications. + * + * @return the notifications value. + */ + public List notifications() { + return this.notifications; + } + + /** + * Set the notifications property: The notifications. + * + * @param notifications the notifications value to set. + * @return the ResourceType object itself. + */ + public ResourceType withNotifications(List notifications) { + this.notifications = notifications; + return this; + } + + /** + * Get the linkedNotificationRules property: The linked notification rules. + * + * @return the linkedNotificationRules value. + */ + public List linkedNotificationRules() { + return this.linkedNotificationRules; + } + + /** + * Set the linkedNotificationRules property: The linked notification rules. + * + * @param linkedNotificationRules the linkedNotificationRules value to set. + * @return the ResourceType object itself. + */ + public ResourceType withLinkedNotificationRules(List linkedNotificationRules) { + this.linkedNotificationRules = linkedNotificationRules; + return this; + } + + /** + * Get the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @return the resourceProviderAuthorizationRules value. + */ + public ResourceProviderAuthorizationRules resourceProviderAuthorizationRules() { + return this.resourceProviderAuthorizationRules; + } + + /** + * Set the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @param resourceProviderAuthorizationRules the resourceProviderAuthorizationRules value to set. + * @return the ResourceType object itself. + */ + public ResourceType + withResourceProviderAuthorizationRules(ResourceProviderAuthorizationRules resourceProviderAuthorizationRules) { + this.resourceProviderAuthorizationRules = resourceProviderAuthorizationRules; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (allowedUnauthorizedActionsExtensions() != null) { + allowedUnauthorizedActionsExtensions().forEach(e -> e.validate()); + } if (authorizationActionMappings() != null) { authorizationActionMappings().forEach(e -> e.validate()); } @@ -668,6 +848,18 @@ public void validate() { if (linkedOperationRules() != null) { linkedOperationRules().forEach(e -> e.validate()); } + if (quotaRule() != null) { + quotaRule().validate(); + } + if (notifications() != null) { + notifications().forEach(e -> e.validate()); + } + if (linkedNotificationRules() != null) { + linkedNotificationRules().forEach(e -> e.validate()); + } + if (resourceProviderAuthorizationRules() != null) { + resourceProviderAuthorizationRules().validate(); + } } /** @@ -678,10 +870,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("routingType", this.routingType == null ? null : this.routingType.toString()); + jsonWriter.writeStringField("additionalOptions", + this.additionalOptions == null ? null : this.additionalOptions.toString()); + jsonWriter.writeStringField("crossTenantTokenValidation", + this.crossTenantTokenValidation == null ? null : this.crossTenantTokenValidation.toString()); jsonWriter.writeStringField("resourceValidation", this.resourceValidation == null ? null : this.resourceValidation.toString()); jsonWriter.writeArrayField("allowedUnauthorizedActions", this.allowedUnauthorizedActions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("allowedUnauthorizedActionsExtensions", this.allowedUnauthorizedActionsExtensions, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("authorizationActionMappings", this.authorizationActionMappings, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("linkedAccessChecks", this.linkedAccessChecks, @@ -713,6 +911,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("resourceDeletionPolicy", this.resourceDeletionPolicy == null ? null : this.resourceDeletionPolicy.toString()); + jsonWriter.writeJsonField("quotaRule", this.quotaRule); + jsonWriter.writeArrayField("notifications", this.notifications, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("linkedNotificationRules", this.linkedNotificationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("resourceProviderAuthorizationRules", this.resourceProviderAuthorizationRules); return jsonWriter.writeEndObject(); } @@ -735,11 +938,21 @@ public static ResourceType fromJson(JsonReader jsonReader) throws IOException { deserializedResourceType.name = reader.getString(); } else if ("routingType".equals(fieldName)) { deserializedResourceType.routingType = RoutingType.fromString(reader.getString()); + } else if ("additionalOptions".equals(fieldName)) { + deserializedResourceType.additionalOptions = AdditionalOptions.fromString(reader.getString()); + } else if ("crossTenantTokenValidation".equals(fieldName)) { + deserializedResourceType.crossTenantTokenValidation + = CrossTenantTokenValidation.fromString(reader.getString()); } else if ("resourceValidation".equals(fieldName)) { deserializedResourceType.resourceValidation = ResourceValidation.fromString(reader.getString()); } else if ("allowedUnauthorizedActions".equals(fieldName)) { List allowedUnauthorizedActions = reader.readArray(reader1 -> reader1.getString()); deserializedResourceType.allowedUnauthorizedActions = allowedUnauthorizedActions; + } else if ("allowedUnauthorizedActionsExtensions".equals(fieldName)) { + List allowedUnauthorizedActionsExtensions + = reader.readArray(reader1 -> AllowedUnauthorizedActionsExtension.fromJson(reader1)); + deserializedResourceType.allowedUnauthorizedActionsExtensions + = allowedUnauthorizedActionsExtensions; } else if ("authorizationActionMappings".equals(fieldName)) { List authorizationActionMappings = reader.readArray(reader1 -> AuthorizationActionMapping.fromJson(reader1)); @@ -801,6 +1014,18 @@ public static ResourceType fromJson(JsonReader jsonReader) throws IOException { } else if ("resourceDeletionPolicy".equals(fieldName)) { deserializedResourceType.resourceDeletionPolicy = ManifestResourceDeletionPolicy.fromString(reader.getString()); + } else if ("quotaRule".equals(fieldName)) { + deserializedResourceType.quotaRule = QuotaRule.fromJson(reader); + } else if ("notifications".equals(fieldName)) { + List notifications = reader.readArray(reader1 -> Notification.fromJson(reader1)); + deserializedResourceType.notifications = notifications; + } else if ("linkedNotificationRules".equals(fieldName)) { + List linkedNotificationRules + = reader.readArray(reader1 -> LinkedNotificationRule.fromJson(reader1)); + deserializedResourceType.linkedNotificationRules = linkedNotificationRules; + } else if ("resourceProviderAuthorizationRules".equals(fieldName)) { + deserializedResourceType.resourceProviderAuthorizationRules + = ResourceProviderAuthorizationRules.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeCategory.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeCategory.java new file mode 100644 index 000000000000..4ed536de2310 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeCategory.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The category. + */ +public final class ResourceTypeCategory extends ExpandableStringEnum { + /** + * Static value None for ResourceTypeCategory. + */ + public static final ResourceTypeCategory NONE = fromString("None"); + + /** + * Static value FreeForm for ResourceTypeCategory. + */ + public static final ResourceTypeCategory FREE_FORM = fromString("FreeForm"); + + /** + * Static value Internal for ResourceTypeCategory. + */ + public static final ResourceTypeCategory INTERNAL = fromString("Internal"); + + /** + * Static value PureProxy for ResourceTypeCategory. + */ + public static final ResourceTypeCategory PURE_PROXY = fromString("PureProxy"); + + /** + * Creates a new instance of ResourceTypeCategory value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceTypeCategory() { + } + + /** + * Creates or finds a ResourceTypeCategory from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceTypeCategory. + */ + public static ResourceTypeCategory fromString(String name) { + return fromString(name, ResourceTypeCategory.class); + } + + /** + * Gets known ResourceTypeCategory values. + * + * @return known ResourceTypeCategory values. + */ + public static Collection values() { + return values(ResourceTypeCategory.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpoint.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpoint.java index b79bb64b8047..b28b0789bc99 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpoint.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpoint.java @@ -20,40 +20,86 @@ @Fluent public final class ResourceTypeEndpoint implements JsonSerializable { /* - * The enabled property. + * Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + private ResourceTypeEndpointKind kind; + + /* + * Whether the endpoint is enabled. */ private Boolean enabled; /* - * The apiVersions property. + * The api versions. */ private List apiVersions; /* - * The locations property. + * The locations. */ private List locations; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; /* - * The featuresRule property. + * The features rule. */ private ResourceTypeEndpointFeaturesRule featuresRule; /* - * The extensions property. + * The extensions. */ private List extensions; /* - * The timeout property. + * The timeout. */ private Duration timeout; + /* + * The endpoint type. + */ + private EndpointTypeResourceType endpointType; + + /* + * The token auth configuration. + */ + private TokenAuthConfiguration tokenAuthConfiguration; + + /* + * The sku link. + */ + private String skuLink; + + /* + * The endpoint uri. + */ + private String endpointUri; + + /* + * Api version. + */ + private String apiVersion; + + /* + * List of zones. + */ + private List zones; + + /* + * The dsts configuration. + */ + private ResourceTypeEndpointDstsConfiguration dstsConfiguration; + + /* + * The data boundary. + */ + private DataBoundary dataBoundary; + /** * Creates an instance of ResourceTypeEndpoint class. */ @@ -61,7 +107,29 @@ public ResourceTypeEndpoint() { } /** - * Get the enabled property: The enabled property. + * Get the kind property: Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render + * different UX experiences for resources of the same type. + * + * @return the kind value. + */ + public ResourceTypeEndpointKind kind() { + return this.kind; + } + + /** + * Set the kind property: Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render + * different UX experiences for resources of the same type. + * + * @param kind the kind value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withKind(ResourceTypeEndpointKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the enabled property: Whether the endpoint is enabled. * * @return the enabled value. */ @@ -70,7 +138,7 @@ public Boolean enabled() { } /** - * Set the enabled property: The enabled property. + * Set the enabled property: Whether the endpoint is enabled. * * @param enabled the enabled value to set. * @return the ResourceTypeEndpoint object itself. @@ -81,7 +149,7 @@ public ResourceTypeEndpoint withEnabled(Boolean enabled) { } /** - * Get the apiVersions property: The apiVersions property. + * Get the apiVersions property: The api versions. * * @return the apiVersions value. */ @@ -90,7 +158,7 @@ public List apiVersions() { } /** - * Set the apiVersions property: The apiVersions property. + * Set the apiVersions property: The api versions. * * @param apiVersions the apiVersions value to set. * @return the ResourceTypeEndpoint object itself. @@ -101,7 +169,7 @@ public ResourceTypeEndpoint withApiVersions(List apiVersions) { } /** - * Get the locations property: The locations property. + * Get the locations property: The locations. * * @return the locations value. */ @@ -110,7 +178,7 @@ public List locations() { } /** - * Set the locations property: The locations property. + * Set the locations property: The locations. * * @param locations the locations value to set. * @return the ResourceTypeEndpoint object itself. @@ -121,7 +189,7 @@ public ResourceTypeEndpoint withLocations(List locations) { } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -130,7 +198,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the ResourceTypeEndpoint object itself. @@ -141,7 +209,7 @@ public ResourceTypeEndpoint withRequiredFeatures(List requiredFeatures) } /** - * Get the featuresRule property: The featuresRule property. + * Get the featuresRule property: The features rule. * * @return the featuresRule value. */ @@ -150,7 +218,7 @@ public ResourceTypeEndpointFeaturesRule featuresRule() { } /** - * Set the featuresRule property: The featuresRule property. + * Set the featuresRule property: The features rule. * * @param featuresRule the featuresRule value to set. * @return the ResourceTypeEndpoint object itself. @@ -161,7 +229,7 @@ public ResourceTypeEndpoint withFeaturesRule(ResourceTypeEndpointFeaturesRule fe } /** - * Get the extensions property: The extensions property. + * Get the extensions property: The extensions. * * @return the extensions value. */ @@ -170,7 +238,7 @@ public List extensions() { } /** - * Set the extensions property: The extensions property. + * Set the extensions property: The extensions. * * @param extensions the extensions value to set. * @return the ResourceTypeEndpoint object itself. @@ -181,7 +249,7 @@ public ResourceTypeEndpoint withExtensions(List extension } /** - * Get the timeout property: The timeout property. + * Get the timeout property: The timeout. * * @return the timeout value. */ @@ -190,7 +258,7 @@ public Duration timeout() { } /** - * Set the timeout property: The timeout property. + * Set the timeout property: The timeout. * * @param timeout the timeout value to set. * @return the ResourceTypeEndpoint object itself. @@ -200,6 +268,166 @@ public ResourceTypeEndpoint withTimeout(Duration timeout) { return this; } + /** + * Get the endpointType property: The endpoint type. + * + * @return the endpointType value. + */ + public EndpointTypeResourceType endpointType() { + return this.endpointType; + } + + /** + * Set the endpointType property: The endpoint type. + * + * @param endpointType the endpointType value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withEndpointType(EndpointTypeResourceType endpointType) { + this.endpointType = endpointType; + return this; + } + + /** + * Get the tokenAuthConfiguration property: The token auth configuration. + * + * @return the tokenAuthConfiguration value. + */ + public TokenAuthConfiguration tokenAuthConfiguration() { + return this.tokenAuthConfiguration; + } + + /** + * Set the tokenAuthConfiguration property: The token auth configuration. + * + * @param tokenAuthConfiguration the tokenAuthConfiguration value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withTokenAuthConfiguration(TokenAuthConfiguration tokenAuthConfiguration) { + this.tokenAuthConfiguration = tokenAuthConfiguration; + return this; + } + + /** + * Get the skuLink property: The sku link. + * + * @return the skuLink value. + */ + public String skuLink() { + return this.skuLink; + } + + /** + * Set the skuLink property: The sku link. + * + * @param skuLink the skuLink value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withSkuLink(String skuLink) { + this.skuLink = skuLink; + return this; + } + + /** + * Get the endpointUri property: The endpoint uri. + * + * @return the endpointUri value. + */ + public String endpointUri() { + return this.endpointUri; + } + + /** + * Set the endpointUri property: The endpoint uri. + * + * @param endpointUri the endpointUri value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withEndpointUri(String endpointUri) { + this.endpointUri = endpointUri; + return this; + } + + /** + * Get the apiVersion property: Api version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Set the apiVersion property: Api version. + * + * @param apiVersion the apiVersion value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Get the zones property: List of zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: List of zones. + * + * @param zones the zones value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the dstsConfiguration property: The dsts configuration. + * + * @return the dstsConfiguration value. + */ + public ResourceTypeEndpointDstsConfiguration dstsConfiguration() { + return this.dstsConfiguration; + } + + /** + * Set the dstsConfiguration property: The dsts configuration. + * + * @param dstsConfiguration the dstsConfiguration value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withDstsConfiguration(ResourceTypeEndpointDstsConfiguration dstsConfiguration) { + this.dstsConfiguration = dstsConfiguration; + return this; + } + + /** + * Get the dataBoundary property: The data boundary. + * + * @return the dataBoundary value. + */ + public DataBoundary dataBoundary() { + return this.dataBoundary; + } + + /** + * Set the dataBoundary property: The data boundary. + * + * @param dataBoundary the dataBoundary value to set. + * @return the ResourceTypeEndpoint object itself. + */ + public ResourceTypeEndpoint withDataBoundary(DataBoundary dataBoundary) { + this.dataBoundary = dataBoundary; + return this; + } + /** * Validates the instance. * @@ -212,6 +440,12 @@ public void validate() { if (extensions() != null) { extensions().forEach(e -> e.validate()); } + if (tokenAuthConfiguration() != null) { + tokenAuthConfiguration().validate(); + } + if (dstsConfiguration() != null) { + dstsConfiguration().validate(); + } } /** @@ -220,6 +454,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); jsonWriter.writeBooleanField("enabled", this.enabled); jsonWriter.writeArrayField("apiVersions", this.apiVersions, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeString(element)); @@ -228,6 +463,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("featuresRule", this.featuresRule); jsonWriter.writeArrayField("extensions", this.extensions, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeJsonField("tokenAuthConfiguration", this.tokenAuthConfiguration); + jsonWriter.writeStringField("skuLink", this.skuLink); + jsonWriter.writeStringField("endpointUri", this.endpointUri); + jsonWriter.writeStringField("apiVersion", this.apiVersion); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("dstsConfiguration", this.dstsConfiguration); + jsonWriter.writeStringField("dataBoundary", this.dataBoundary == null ? null : this.dataBoundary.toString()); return jsonWriter.writeEndObject(); } @@ -246,7 +489,9 @@ public static ResourceTypeEndpoint fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enabled".equals(fieldName)) { + if ("kind".equals(fieldName)) { + deserializedResourceTypeEndpoint.kind = ResourceTypeEndpointKind.fromString(reader.getString()); + } else if ("enabled".equals(fieldName)) { deserializedResourceTypeEndpoint.enabled = reader.getNullable(JsonReader::getBoolean); } else if ("apiVersions".equals(fieldName)) { List apiVersions = reader.readArray(reader1 -> reader1.getString()); @@ -266,6 +511,25 @@ public static ResourceTypeEndpoint fromJson(JsonReader jsonReader) throws IOExce } else if ("timeout".equals(fieldName)) { deserializedResourceTypeEndpoint.timeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("endpointType".equals(fieldName)) { + deserializedResourceTypeEndpoint.endpointType + = EndpointTypeResourceType.fromString(reader.getString()); + } else if ("tokenAuthConfiguration".equals(fieldName)) { + deserializedResourceTypeEndpoint.tokenAuthConfiguration = TokenAuthConfiguration.fromJson(reader); + } else if ("skuLink".equals(fieldName)) { + deserializedResourceTypeEndpoint.skuLink = reader.getString(); + } else if ("endpointUri".equals(fieldName)) { + deserializedResourceTypeEndpoint.endpointUri = reader.getString(); + } else if ("apiVersion".equals(fieldName)) { + deserializedResourceTypeEndpoint.apiVersion = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeEndpoint.zones = zones; + } else if ("dstsConfiguration".equals(fieldName)) { + deserializedResourceTypeEndpoint.dstsConfiguration + = ResourceTypeEndpointDstsConfiguration.fromJson(reader); + } else if ("dataBoundary".equals(fieldName)) { + deserializedResourceTypeEndpoint.dataBoundary = DataBoundary.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBase.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBase.java new file mode 100644 index 000000000000..5579bb3b536b --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBase.java @@ -0,0 +1,474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.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 java.io.IOException; +import java.time.Duration; +import java.util.List; + +/** + * The ResourceTypeEndpointBase model. + */ +@Fluent +public class ResourceTypeEndpointBase implements JsonSerializable { + /* + * Whether it's enabled. + */ + private boolean enabled; + + /* + * The api versions. + */ + private List apiVersions; + + /* + * The endpoint uri. + */ + private String endpointUri; + + /* + * The locations. + */ + private List locations; + + /* + * The required features. + */ + private List requiredFeatures; + + /* + * The features rule. + */ + private ResourceTypeEndpointBaseFeaturesRule featuresRule; + + /* + * This is a TimeSpan property. + */ + private Duration timeout; + + /* + * The endpoint type. + */ + private EndpointType endpointType; + + /* + * The dsts configuration. + */ + private ResourceTypeEndpointBaseDstsConfiguration dstsConfiguration; + + /* + * The sku link. + */ + private String skuLink; + + /* + * The api version. + */ + private String apiVersion; + + /* + * The zones. + */ + private List zones; + + /** + * Creates an instance of ResourceTypeEndpointBase class. + */ + public ResourceTypeEndpointBase() { + } + + /** + * Get the enabled property: Whether it's enabled. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether it's enabled. + * + * @param enabled the enabled value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the apiVersions property: The api versions. + * + * @return the apiVersions value. + */ + public List apiVersions() { + return this.apiVersions; + } + + /** + * Set the apiVersions property: The api versions. + * + * @param apiVersions the apiVersions value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withApiVersions(List apiVersions) { + this.apiVersions = apiVersions; + return this; + } + + /** + * Get the endpointUri property: The endpoint uri. + * + * @return the endpointUri value. + */ + public String endpointUri() { + return this.endpointUri; + } + + /** + * Set the endpointUri property: The endpoint uri. + * + * @param endpointUri the endpointUri value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withEndpointUri(String endpointUri) { + this.endpointUri = endpointUri; + return this; + } + + /** + * Get the locations property: The locations. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: The locations. + * + * @param locations the locations value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the requiredFeatures property: The required features. + * + * @return the requiredFeatures value. + */ + public List requiredFeatures() { + return this.requiredFeatures; + } + + /** + * Set the requiredFeatures property: The required features. + * + * @param requiredFeatures the requiredFeatures value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withRequiredFeatures(List requiredFeatures) { + this.requiredFeatures = requiredFeatures; + return this; + } + + /** + * Get the featuresRule property: The features rule. + * + * @return the featuresRule value. + */ + public ResourceTypeEndpointBaseFeaturesRule featuresRule() { + return this.featuresRule; + } + + /** + * Set the featuresRule property: The features rule. + * + * @param featuresRule the featuresRule value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withFeaturesRule(ResourceTypeEndpointBaseFeaturesRule featuresRule) { + this.featuresRule = featuresRule; + return this; + } + + /** + * Get the timeout property: This is a TimeSpan property. + * + * @return the timeout value. + */ + public Duration timeout() { + return this.timeout; + } + + /** + * Set the timeout property: This is a TimeSpan property. + * + * @param timeout the timeout value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withTimeout(Duration timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get the endpointType property: The endpoint type. + * + * @return the endpointType value. + */ + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * Set the endpointType property: The endpoint type. + * + * @param endpointType the endpointType value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withEndpointType(EndpointType endpointType) { + this.endpointType = endpointType; + return this; + } + + /** + * Get the dstsConfiguration property: The dsts configuration. + * + * @return the dstsConfiguration value. + */ + public ResourceTypeEndpointBaseDstsConfiguration dstsConfiguration() { + return this.dstsConfiguration; + } + + /** + * Set the dstsConfiguration property: The dsts configuration. + * + * @param dstsConfiguration the dstsConfiguration value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withDstsConfiguration(ResourceTypeEndpointBaseDstsConfiguration dstsConfiguration) { + this.dstsConfiguration = dstsConfiguration; + return this; + } + + /** + * Get the skuLink property: The sku link. + * + * @return the skuLink value. + */ + public String skuLink() { + return this.skuLink; + } + + /** + * Set the skuLink property: The sku link. + * + * @param skuLink the skuLink value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withSkuLink(String skuLink) { + this.skuLink = skuLink; + return this; + } + + /** + * Get the apiVersion property: The api version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** + * Set the apiVersion property: The api version. + * + * @param apiVersion the apiVersion value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * Get the zones property: The zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The zones. + * + * @param zones the zones value to set. + * @return the ResourceTypeEndpointBase object itself. + */ + public ResourceTypeEndpointBase withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (apiVersions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property apiVersions in model ResourceTypeEndpointBase")); + } + if (endpointUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property endpointUri in model ResourceTypeEndpointBase")); + } + if (locations() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property locations in model ResourceTypeEndpointBase")); + } + if (requiredFeatures() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property requiredFeatures in model ResourceTypeEndpointBase")); + } + if (featuresRule() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property featuresRule in model ResourceTypeEndpointBase")); + } else { + featuresRule().validate(); + } + if (timeout() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property timeout in model ResourceTypeEndpointBase")); + } + if (endpointType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property endpointType in model ResourceTypeEndpointBase")); + } + if (dstsConfiguration() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dstsConfiguration in model ResourceTypeEndpointBase")); + } else { + dstsConfiguration().validate(); + } + if (skuLink() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property skuLink in model ResourceTypeEndpointBase")); + } + if (apiVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property apiVersion in model ResourceTypeEndpointBase")); + } + if (zones() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property zones in model ResourceTypeEndpointBase")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceTypeEndpointBase.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeArrayField("apiVersions", this.apiVersions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("endpointUri", this.endpointUri); + jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("featuresRule", this.featuresRule); + jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeJsonField("dstsConfiguration", this.dstsConfiguration); + jsonWriter.writeStringField("skuLink", this.skuLink); + jsonWriter.writeStringField("apiVersion", this.apiVersion); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeEndpointBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeEndpointBase 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 ResourceTypeEndpointBase. + */ + public static ResourceTypeEndpointBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeEndpointBase deserializedResourceTypeEndpointBase = new ResourceTypeEndpointBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedResourceTypeEndpointBase.enabled = reader.getBoolean(); + } else if ("apiVersions".equals(fieldName)) { + List apiVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeEndpointBase.apiVersions = apiVersions; + } else if ("endpointUri".equals(fieldName)) { + deserializedResourceTypeEndpointBase.endpointUri = reader.getString(); + } else if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeEndpointBase.locations = locations; + } else if ("requiredFeatures".equals(fieldName)) { + List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeEndpointBase.requiredFeatures = requiredFeatures; + } else if ("featuresRule".equals(fieldName)) { + deserializedResourceTypeEndpointBase.featuresRule + = ResourceTypeEndpointBaseFeaturesRule.fromJson(reader); + } else if ("timeout".equals(fieldName)) { + deserializedResourceTypeEndpointBase.timeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("endpointType".equals(fieldName)) { + deserializedResourceTypeEndpointBase.endpointType = EndpointType.fromString(reader.getString()); + } else if ("dstsConfiguration".equals(fieldName)) { + deserializedResourceTypeEndpointBase.dstsConfiguration + = ResourceTypeEndpointBaseDstsConfiguration.fromJson(reader); + } else if ("skuLink".equals(fieldName)) { + deserializedResourceTypeEndpointBase.skuLink = reader.getString(); + } else if ("apiVersion".equals(fieldName)) { + deserializedResourceTypeEndpointBase.apiVersion = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeEndpointBase.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeEndpointBase; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseDstsConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseDstsConfiguration.java new file mode 100644 index 000000000000..55654e8cbb98 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseDstsConfiguration.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The dsts configuration. + */ +@Fluent +public final class ResourceTypeEndpointBaseDstsConfiguration extends DstsConfiguration { + /** + * Creates an instance of ResourceTypeEndpointBaseDstsConfiguration class. + */ + public ResourceTypeEndpointBaseDstsConfiguration() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeEndpointBaseDstsConfiguration withServiceName(String serviceName) { + super.withServiceName(serviceName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeEndpointBaseDstsConfiguration withServiceDnsName(String serviceDnsName) { + super.withServiceDnsName(serviceDnsName); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (serviceName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceName in model ResourceTypeEndpointBaseDstsConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceTypeEndpointBaseDstsConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", serviceName()); + jsonWriter.writeStringField("serviceDnsName", serviceDnsName()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeEndpointBaseDstsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeEndpointBaseDstsConfiguration 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 ResourceTypeEndpointBaseDstsConfiguration. + */ + public static ResourceTypeEndpointBaseDstsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeEndpointBaseDstsConfiguration deserializedResourceTypeEndpointBaseDstsConfiguration + = new ResourceTypeEndpointBaseDstsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedResourceTypeEndpointBaseDstsConfiguration.withServiceName(reader.getString()); + } else if ("serviceDnsName".equals(fieldName)) { + deserializedResourceTypeEndpointBaseDstsConfiguration.withServiceDnsName(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeEndpointBaseDstsConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseFeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseFeaturesRule.java new file mode 100644 index 000000000000..a11f9d6f09df --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointBaseFeaturesRule.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The features rule. + */ +@Fluent +public final class ResourceTypeEndpointBaseFeaturesRule extends FeaturesRule { + /** + * Creates an instance of ResourceTypeEndpointBaseFeaturesRule class. + */ + public ResourceTypeEndpointBaseFeaturesRule() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeEndpointBaseFeaturesRule withRequiredFeaturesPolicy(FeaturesPolicy requiredFeaturesPolicy) { + super.withRequiredFeaturesPolicy(requiredFeaturesPolicy); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (requiredFeaturesPolicy() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property requiredFeaturesPolicy in model ResourceTypeEndpointBaseFeaturesRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceTypeEndpointBaseFeaturesRule.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("requiredFeaturesPolicy", + requiredFeaturesPolicy() == null ? null : requiredFeaturesPolicy().toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeEndpointBaseFeaturesRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeEndpointBaseFeaturesRule 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 ResourceTypeEndpointBaseFeaturesRule. + */ + public static ResourceTypeEndpointBaseFeaturesRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeEndpointBaseFeaturesRule deserializedResourceTypeEndpointBaseFeaturesRule + = new ResourceTypeEndpointBaseFeaturesRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requiredFeaturesPolicy".equals(fieldName)) { + deserializedResourceTypeEndpointBaseFeaturesRule + .withRequiredFeaturesPolicy(FeaturesPolicy.fromString(reader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeEndpointBaseFeaturesRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointDstsConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointDstsConfiguration.java new file mode 100644 index 000000000000..cd651f9ec84c --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointDstsConfiguration.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The dsts configuration. + */ +@Fluent +public final class ResourceTypeEndpointDstsConfiguration extends DstsConfiguration { + /** + * Creates an instance of ResourceTypeEndpointDstsConfiguration class. + */ + public ResourceTypeEndpointDstsConfiguration() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeEndpointDstsConfiguration withServiceName(String serviceName) { + super.withServiceName(serviceName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeEndpointDstsConfiguration withServiceDnsName(String serviceDnsName) { + super.withServiceDnsName(serviceDnsName); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (serviceName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceName in model ResourceTypeEndpointDstsConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceTypeEndpointDstsConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", serviceName()); + jsonWriter.writeStringField("serviceDnsName", serviceDnsName()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeEndpointDstsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeEndpointDstsConfiguration 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 ResourceTypeEndpointDstsConfiguration. + */ + public static ResourceTypeEndpointDstsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeEndpointDstsConfiguration deserializedResourceTypeEndpointDstsConfiguration + = new ResourceTypeEndpointDstsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedResourceTypeEndpointDstsConfiguration.withServiceName(reader.getString()); + } else if ("serviceDnsName".equals(fieldName)) { + deserializedResourceTypeEndpointDstsConfiguration.withServiceDnsName(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeEndpointDstsConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointFeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointFeaturesRule.java index 03f010914c29..52d642632f58 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointFeaturesRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointFeaturesRule.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ResourceTypeEndpointFeaturesRule model. + * The features rule. */ @Fluent public final class ResourceTypeEndpointFeaturesRule extends FeaturesRule { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointKind.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointKind.java new file mode 100644 index 000000000000..c42b8d5f91d6 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeEndpointKind.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render different UX experiences for + * resources of the same type. + */ +public final class ResourceTypeEndpointKind extends ExpandableStringEnum { + /** + * Static value Managed for ResourceTypeEndpointKind. + */ + public static final ResourceTypeEndpointKind MANAGED = fromString("Managed"); + + /** + * Static value Direct for ResourceTypeEndpointKind. + */ + public static final ResourceTypeEndpointKind DIRECT = fromString("Direct"); + + /** + * Creates a new instance of ResourceTypeEndpointKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceTypeEndpointKind() { + } + + /** + * Creates or finds a ResourceTypeEndpointKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceTypeEndpointKind. + */ + public static ResourceTypeEndpointKind fromString(String name) { + return fromString(name, ResourceTypeEndpointKind.class); + } + + /** + * Gets known ResourceTypeEndpointKind values. + * + * @return known ResourceTypeEndpointKind values. + */ + public static Collection values() { + return values(ResourceTypeEndpointKind.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtendedLocationPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtendedLocationPolicy.java new file mode 100644 index 000000000000..c2fb7018a6d6 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtendedLocationPolicy.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ResourceTypeExtendedLocationPolicy. + */ +public final class ResourceTypeExtendedLocationPolicy extends ExpandableStringEnum { + /** + * Static value NotSpecified for ResourceTypeExtendedLocationPolicy. + */ + public static final ResourceTypeExtendedLocationPolicy NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value All for ResourceTypeExtendedLocationPolicy. + */ + public static final ResourceTypeExtendedLocationPolicy ALL = fromString("All"); + + /** + * Creates a new instance of ResourceTypeExtendedLocationPolicy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceTypeExtendedLocationPolicy() { + } + + /** + * Creates or finds a ResourceTypeExtendedLocationPolicy from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceTypeExtendedLocationPolicy. + */ + public static ResourceTypeExtendedLocationPolicy fromString(String name) { + return fromString(name, ResourceTypeExtendedLocationPolicy.class); + } + + /** + * Gets known ResourceTypeExtendedLocationPolicy values. + * + * @return known ResourceTypeExtendedLocationPolicy values. + */ + public static Collection values() { + return values(ResourceTypeExtendedLocationPolicy.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtension.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtension.java index e80723246331..4e856d4fe78b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtension.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtension.java @@ -20,17 +20,17 @@ @Fluent public final class ResourceTypeExtension implements JsonSerializable { /* - * The endpointUri property. + * The endpoint uri. */ private String endpointUri; /* - * The extensionCategories property. + * The extension categories. */ private List extensionCategories; /* - * The timeout property. + * The timeout. */ private Duration timeout; @@ -41,7 +41,7 @@ public ResourceTypeExtension() { } /** - * Get the endpointUri property: The endpointUri property. + * Get the endpointUri property: The endpoint uri. * * @return the endpointUri value. */ @@ -50,7 +50,7 @@ public String endpointUri() { } /** - * Set the endpointUri property: The endpointUri property. + * Set the endpointUri property: The endpoint uri. * * @param endpointUri the endpointUri value to set. * @return the ResourceTypeExtension object itself. @@ -61,7 +61,7 @@ public ResourceTypeExtension withEndpointUri(String endpointUri) { } /** - * Get the extensionCategories property: The extensionCategories property. + * Get the extensionCategories property: The extension categories. * * @return the extensionCategories value. */ @@ -70,7 +70,7 @@ public List extensionCategories() { } /** - * Set the extensionCategories property: The extensionCategories property. + * Set the extensionCategories property: The extension categories. * * @param extensionCategories the extensionCategories value to set. * @return the ResourceTypeExtension object itself. @@ -81,7 +81,7 @@ public ResourceTypeExtension withExtensionCategories(List ext } /** - * Get the timeout property: The timeout property. + * Get the timeout property: The timeout. * * @return the timeout value. */ @@ -90,7 +90,7 @@ public Duration timeout() { } /** - * Set the timeout property: The timeout property. + * Set the timeout property: The timeout. * * @param timeout the timeout value to set. * @return the ResourceTypeExtension object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptions.java index 06626b0e14fb..29f8c755f0cf 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptions.java @@ -17,7 +17,7 @@ @Fluent public class ResourceTypeExtensionOptions implements JsonSerializable { /* - * The resourceCreationBegin property. + * Resource creation begin. */ private ResourceTypeExtensionOptionsResourceCreationBegin resourceCreationBegin; @@ -28,7 +28,7 @@ public ResourceTypeExtensionOptions() { } /** - * Get the resourceCreationBegin property: The resourceCreationBegin property. + * Get the resourceCreationBegin property: Resource creation begin. * * @return the resourceCreationBegin value. */ @@ -37,7 +37,7 @@ public ResourceTypeExtensionOptionsResourceCreationBegin resourceCreationBegin() } /** - * Set the resourceCreationBegin property: The resourceCreationBegin property. + * Set the resourceCreationBegin property: Resource creation begin. * * @param resourceCreationBegin the resourceCreationBegin value to set. * @return the ResourceTypeExtensionOptions object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptionsResourceCreationBegin.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptionsResourceCreationBegin.java index 7531de7ca91f..cc8136182031 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptionsResourceCreationBegin.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeExtensionOptionsResourceCreationBegin.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ResourceTypeExtensionOptionsResourceCreationBegin model. + * Resource creation begin. */ @Fluent public final class ResourceTypeExtensionOptionsResourceCreationBegin extends ExtensionOptions { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeFeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeFeaturesRule.java index 1521cf6ce1e6..41dc143f7e76 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeFeaturesRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeFeaturesRule.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ResourceTypeFeaturesRule model. + * The features rule. */ @Fluent public final class ResourceTypeFeaturesRule extends FeaturesRule { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeIdentityManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeIdentityManagement.java index 7831c89fc68a..79eaa49de6d1 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeIdentityManagement.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeIdentityManagement.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceTypeIdentityManagement model. + * The identity management. */ @Fluent public final class ResourceTypeIdentityManagement extends IdentityManagement { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeOnBehalfOfToken.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeOnBehalfOfToken.java new file mode 100644 index 000000000000..bf65f45c9b10 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeOnBehalfOfToken.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ResourceTypeOnBehalfOfToken model. + */ +@Fluent +public final class ResourceTypeOnBehalfOfToken implements JsonSerializable { + /* + * The action name. + */ + private String actionName; + + /* + * This is a TimeSpan property. + */ + private String lifeTime; + + /** + * Creates an instance of ResourceTypeOnBehalfOfToken class. + */ + public ResourceTypeOnBehalfOfToken() { + } + + /** + * Get the actionName property: The action name. + * + * @return the actionName value. + */ + public String actionName() { + return this.actionName; + } + + /** + * Set the actionName property: The action name. + * + * @param actionName the actionName value to set. + * @return the ResourceTypeOnBehalfOfToken object itself. + */ + public ResourceTypeOnBehalfOfToken withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get the lifeTime property: This is a TimeSpan property. + * + * @return the lifeTime value. + */ + public String lifeTime() { + return this.lifeTime; + } + + /** + * Set the lifeTime property: This is a TimeSpan property. + * + * @param lifeTime the lifeTime value to set. + * @return the ResourceTypeOnBehalfOfToken object itself. + */ + public ResourceTypeOnBehalfOfToken withLifeTime(String lifeTime) { + this.lifeTime = lifeTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("actionName", this.actionName); + jsonWriter.writeStringField("lifeTime", this.lifeTime); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeOnBehalfOfToken from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeOnBehalfOfToken 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 ResourceTypeOnBehalfOfToken. + */ + public static ResourceTypeOnBehalfOfToken fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeOnBehalfOfToken deserializedResourceTypeOnBehalfOfToken = new ResourceTypeOnBehalfOfToken(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actionName".equals(fieldName)) { + deserializedResourceTypeOnBehalfOfToken.actionName = reader.getString(); + } else if ("lifeTime".equals(fieldName)) { + deserializedResourceTypeOnBehalfOfToken.lifeTime = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeOnBehalfOfToken; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistration.java index f04be5b8f188..b90d5387365c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistration.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistration.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.providerhub.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.ResourceTypeRegistrationInner; @@ -39,6 +40,21 @@ public interface ResourceTypeRegistration { */ ResourceTypeRegistrationProperties properties(); + /** + * Gets the kind property: Resource type registration kind. This Metadata is also used by portal/tooling/etc to + * render different UX experiences for resources of the same type. + * + * @return the kind value. + */ + ResourceTypeRegistrationKind kind(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.ResourceTypeRegistrationInner object. * @@ -80,7 +96,7 @@ interface WithParentResource { * The stage of the ResourceTypeRegistration definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithProperties { + interface WithCreate extends DefinitionStages.WithProperties, DefinitionStages.WithKind { /** * Executes the create request. * @@ -109,6 +125,21 @@ interface WithProperties { */ WithCreate withProperties(ResourceTypeRegistrationProperties properties); } + + /** + * The stage of the ResourceTypeRegistration definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Resource type registration kind. This Metadata is also used by + * portal/tooling/etc to render different UX experiences for resources of the same type.. + * + * @param kind Resource type registration kind. This Metadata is also used by portal/tooling/etc to render + * different UX experiences for resources of the same type. + * @return the next definition stage. + */ + WithCreate withKind(ResourceTypeRegistrationKind kind); + } } /** @@ -121,7 +152,7 @@ interface WithProperties { /** * The template for ResourceTypeRegistration update. */ - interface Update extends UpdateStages.WithProperties { + interface Update extends UpdateStages.WithProperties, UpdateStages.WithKind { /** * Executes the update request. * @@ -154,6 +185,21 @@ interface WithProperties { */ Update withProperties(ResourceTypeRegistrationProperties properties); } + + /** + * The stage of the ResourceTypeRegistration update allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Resource type registration kind. This Metadata is also used by + * portal/tooling/etc to render different UX experiences for resources of the same type.. + * + * @param kind Resource type registration kind. This Metadata is also used by portal/tooling/etc to render + * different UX experiences for resources of the same type. + * @return the next definition stage. + */ + Update withKind(ResourceTypeRegistrationKind kind); + } } /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationArrayResponseWithContinuation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationArrayResponseWithContinuation.java index 7a305834fefd..0653719545d2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationArrayResponseWithContinuation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationArrayResponseWithContinuation.java @@ -20,7 +20,7 @@ public final class ResourceTypeRegistrationArrayResponseWithContinuation implements JsonSerializable { /* - * The value property. + * The value. */ private List value; @@ -36,7 +36,7 @@ public ResourceTypeRegistrationArrayResponseWithContinuation() { } /** - * Get the value property: The value property. + * Get the value property: The value. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Set the value property: The value property. + * Set the value property: The value. * * @param value the value value to set. * @return the ResourceTypeRegistrationArrayResponseWithContinuation object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationKind.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationKind.java new file mode 100644 index 000000000000..fb89dc30ec73 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationKind.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Resource type registration kind. This Metadata is also used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ +public final class ResourceTypeRegistrationKind extends ExpandableStringEnum { + /** + * Static value Managed for ResourceTypeRegistrationKind. + */ + public static final ResourceTypeRegistrationKind MANAGED = fromString("Managed"); + + /** + * Static value Hybrid for ResourceTypeRegistrationKind. + */ + public static final ResourceTypeRegistrationKind HYBRID = fromString("Hybrid"); + + /** + * Static value Direct for ResourceTypeRegistrationKind. + */ + public static final ResourceTypeRegistrationKind DIRECT = fromString("Direct"); + + /** + * Creates a new instance of ResourceTypeRegistrationKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceTypeRegistrationKind() { + } + + /** + * Creates or finds a ResourceTypeRegistrationKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceTypeRegistrationKind. + */ + public static ResourceTypeRegistrationKind fromString(String name) { + return fromString(name, ResourceTypeRegistrationKind.class); + } + + /** + * Gets known ResourceTypeRegistrationKind values. + * + * @return known ResourceTypeRegistrationKind values. + */ + public static Collection values() { + return values(ResourceTypeRegistrationKind.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationProperties.java index 131a1e084553..5c408529b4bb 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationProperties.java @@ -6,292 +6,1925 @@ import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.util.List; +import java.util.Map; /** * The ResourceTypeRegistrationProperties model. */ @Fluent -public final class ResourceTypeRegistrationProperties extends ResourceTypeRegistrationPropertiesAutoGenerated { +public final class ResourceTypeRegistrationProperties implements JsonSerializable { + /* + * The resource routing type. + */ + private RoutingType routingType; + + /* + * The additional options. + */ + private AdditionalOptionsResourceTypeRegistration additionalOptions; + + /* + * The cross tenant token validation. + */ + private CrossTenantTokenValidation crossTenantTokenValidation; + + /* + * The regionality. + */ + private Regionality regionality; + + /* + * The extensions. + */ + private List endpoints; + + /* + * The extension options. + */ + private ResourceTypeRegistrationPropertiesExtensionOptions extensionOptions; + + /* + * The marketplace type. + */ + private MarketplaceType marketplaceType; + + /* + * The swagger specifications. + */ + private List swaggerSpecifications; + + /* + * The allowed unauthorized actions. + */ + private List allowedUnauthorizedActions; + + /* + * The allowed unauthorized actions extensions. + */ + private List allowedUnauthorizedActionsExtensions; + + /* + * The authorization action mappings + */ + private List authorizationActionMappings; + + /* + * The linked access checks. + */ + private List linkedAccessChecks; + + /* + * The default api version. + */ + private String defaultApiVersion; + + /* + * The logging rules. + */ + private List loggingRules; + + /* + * The throttling rules. + */ + private List throttlingRules; + + /* + * The required features. + */ + private List requiredFeatures; + + /* + * The features rule. + */ + private ResourceTypeRegistrationPropertiesFeaturesRule featuresRule; + + /* + * Whether async operation is enabled. + */ + private Boolean enableAsyncOperation; + + /* + * The provisioning state. + */ + private ProvisioningState provisioningState; + + /* + * Whether third party S2S is enabled. + */ + private Boolean enableThirdPartyS2S; + + /* + * The subscription lifecycle notification specifications. + */ + private ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications; + + /* + * Whether it is pure proxy. + */ + private Boolean isPureProxy; + + /* + * The identity management. + */ + private ResourceTypeRegistrationPropertiesIdentityManagement identityManagement; + + /* + * The check name availability specifications. + */ + private ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications; + + /* + * The disallowed action verbs. + */ + private List disallowedActionVerbs; + + /* + * The service tree infos. + */ + private List serviceTreeInfos; + + /* + * The request header options. + */ + private ResourceTypeRegistrationPropertiesRequestHeaderOptions requestHeaderOptions; + + /* + * The subscription state rules. + */ + private List subscriptionStateRules; + + /* + * The template deployment options. + */ + private ResourceTypeRegistrationPropertiesTemplateDeploymentOptions templateDeploymentOptions; + + /* + * The extended locations. + */ + private List extendedLocations; + + /* + * The resource move policy. + */ + private ResourceTypeRegistrationPropertiesResourceMovePolicy resourceMovePolicy; + + /* + * The resource deletion policy. + */ + private ResourceDeletionPolicy resourceDeletionPolicy; + + /* + * The resource concurrency control options. + */ + private Map resourceConcurrencyControlOptions; + + /* + * The resource graph configuration. + */ + private ResourceTypeRegistrationPropertiesResourceGraphConfiguration resourceGraphConfiguration; + + /* + * The resource provider management. + */ + private ResourceTypeRegistrationPropertiesManagement management; + + /* + * The open api configuration. + */ + private OpenApiConfiguration openApiConfiguration; + + /* + * The on behalf of tokens. + */ + private ResourceTypeOnBehalfOfToken onBehalfOfTokens; + + /* + * The category. + */ + private ResourceTypeCategory category; + + /* + * The resource validation. + */ + private ResourceValidation resourceValidation; + + /* + * The disallowed end user operations. + */ + private List disallowedEndUserOperations; + + /* + * The metadata. + */ + private Map metadata; + + /* + * The sku link. + */ + private String skuLink; + + /* + * The quota rule. + */ + private QuotaRule quotaRule; + + /* + * The notifications. + */ + private List notifications; + + /* + * The linked notification rules. + */ + private List linkedNotificationRules; + + /* + * The resource provider authorization rules. + */ + private ResourceProviderAuthorizationRules resourceProviderAuthorizationRules; + + /* + * The token auth configuration. + */ + private TokenAuthConfiguration tokenAuthConfiguration; + + /* + * The template deployment policy. + */ + private ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy templateDeploymentPolicy; + + /* + * The allow empty role assignments. + */ + private Boolean allowEmptyRoleAssignments; + + /* + * The policy execution type. + */ + private PolicyExecutionType policyExecutionType; + + /* + * The availability zone rule. + */ + private ResourceTypeRegistrationPropertiesAvailabilityZoneRule availabilityZoneRule; + + /* + * The dsts configuration. + */ + private ResourceTypeRegistrationPropertiesDstsConfiguration dstsConfiguration; + + /* + * Async timeout rules + */ + private List asyncTimeoutRules; + + /* + * Common API versions for the resource type. + */ + private List commonApiVersions; + + /* + * The api profiles. + */ + private List apiProfiles; + + /* + * The linked operation rules. + */ + private List linkedOperationRules; + + /* + * The legacy name. + */ + private String legacyName; + + /* + * The legacy names. + */ + private List legacyNames; + + /* + * Allowed template deployment reference actions. + */ + private List allowedTemplateDeploymentReferenceActions; + + /* + * The legacy policy. + */ + private ResourceTypeRegistrationPropertiesLegacyPolicy legacyPolicy; + + /* + * Manifest link. + */ + private String manifestLink; + + /* + * Capacity rule. + */ + private ResourceTypeRegistrationPropertiesCapacityRule capacityRule; + + /* + * Marketplace options. + */ + private ResourceTypeRegistrationPropertiesMarketplaceOptions marketplaceOptions; + + /* + * The allowed resource names. + */ + private List allowedResourceNames; + + /* + * Resource cache options. + */ + private ResourceTypeRegistrationPropertiesResourceCache resourceCache; + + /* + * Resource query management options. + */ + private ResourceTypeRegistrationPropertiesResourceQueryManagement resourceQueryManagement; + + /* + * Whether tags are supported. + */ + private Boolean supportsTags; + + /* + * Resource management options. + */ + private ResourceTypeRegistrationPropertiesResourceManagementOptions resourceManagementOptions; + + /* + * Grouping tag. + */ + private String groupingTag; + + /* + * Add resource list target locations? + */ + private Boolean addResourceListTargetLocations; + + /* + * Resource type common attribute management. + */ + private ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement resourceTypeCommonAttributeManagement; + + /* + * Routing rule. + */ + private ResourceTypeRegistrationPropertiesRoutingRule routingRule; + + /* + * The frontdoor request mode. + */ + private FrontdoorRequestMode frontdoorRequestMode; + + /* + * The resource sub type. + */ + private ResourceSubType resourceSubType; + + /* + * The async operation resource type name. + */ + private String asyncOperationResourceTypeName; + + /** + * Creates an instance of ResourceTypeRegistrationProperties class. + */ + public ResourceTypeRegistrationProperties() { + } + + /** + * Get the routingType property: The resource routing type. + * + * @return the routingType value. + */ + public RoutingType routingType() { + return this.routingType; + } + + /** + * Set the routingType property: The resource routing type. + * + * @param routingType the routingType value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withRoutingType(RoutingType routingType) { + this.routingType = routingType; + return this; + } + + /** + * Get the additionalOptions property: The additional options. + * + * @return the additionalOptions value. + */ + public AdditionalOptionsResourceTypeRegistration additionalOptions() { + return this.additionalOptions; + } + + /** + * Set the additionalOptions property: The additional options. + * + * @param additionalOptions the additionalOptions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withAdditionalOptions(AdditionalOptionsResourceTypeRegistration additionalOptions) { + this.additionalOptions = additionalOptions; + return this; + } + + /** + * Get the crossTenantTokenValidation property: The cross tenant token validation. + * + * @return the crossTenantTokenValidation value. + */ + public CrossTenantTokenValidation crossTenantTokenValidation() { + return this.crossTenantTokenValidation; + } + + /** + * Set the crossTenantTokenValidation property: The cross tenant token validation. + * + * @param crossTenantTokenValidation the crossTenantTokenValidation value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withCrossTenantTokenValidation(CrossTenantTokenValidation crossTenantTokenValidation) { + this.crossTenantTokenValidation = crossTenantTokenValidation; + return this; + } + + /** + * Get the regionality property: The regionality. + * + * @return the regionality value. + */ + public Regionality regionality() { + return this.regionality; + } + + /** + * Set the regionality property: The regionality. + * + * @param regionality the regionality value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withRegionality(Regionality regionality) { + this.regionality = regionality; + return this; + } + + /** + * Get the endpoints property: The extensions. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The extensions. + * + * @param endpoints the endpoints value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the extensionOptions property: The extension options. + * + * @return the extensionOptions value. + */ + public ResourceTypeRegistrationPropertiesExtensionOptions extensionOptions() { + return this.extensionOptions; + } + + /** + * Set the extensionOptions property: The extension options. + * + * @param extensionOptions the extensionOptions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withExtensionOptions(ResourceTypeRegistrationPropertiesExtensionOptions extensionOptions) { + this.extensionOptions = extensionOptions; + return this; + } + + /** + * Get the marketplaceType property: The marketplace type. + * + * @return the marketplaceType value. + */ + public MarketplaceType marketplaceType() { + return this.marketplaceType; + } + + /** + * Set the marketplaceType property: The marketplace type. + * + * @param marketplaceType the marketplaceType value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withMarketplaceType(MarketplaceType marketplaceType) { + this.marketplaceType = marketplaceType; + return this; + } + + /** + * Get the swaggerSpecifications property: The swagger specifications. + * + * @return the swaggerSpecifications value. + */ + public List swaggerSpecifications() { + return this.swaggerSpecifications; + } + + /** + * Set the swaggerSpecifications property: The swagger specifications. + * + * @param swaggerSpecifications the swaggerSpecifications value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withSwaggerSpecifications(List swaggerSpecifications) { + this.swaggerSpecifications = swaggerSpecifications; + return this; + } + + /** + * Get the allowedUnauthorizedActions property: The allowed unauthorized actions. + * + * @return the allowedUnauthorizedActions value. + */ + public List allowedUnauthorizedActions() { + return this.allowedUnauthorizedActions; + } + + /** + * Set the allowedUnauthorizedActions property: The allowed unauthorized actions. + * + * @param allowedUnauthorizedActions the allowedUnauthorizedActions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withAllowedUnauthorizedActions(List allowedUnauthorizedActions) { + this.allowedUnauthorizedActions = allowedUnauthorizedActions; + return this; + } + + /** + * Get the allowedUnauthorizedActionsExtensions property: The allowed unauthorized actions extensions. + * + * @return the allowedUnauthorizedActionsExtensions value. + */ + public List allowedUnauthorizedActionsExtensions() { + return this.allowedUnauthorizedActionsExtensions; + } + + /** + * Set the allowedUnauthorizedActionsExtensions property: The allowed unauthorized actions extensions. + * + * @param allowedUnauthorizedActionsExtensions the allowedUnauthorizedActionsExtensions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withAllowedUnauthorizedActionsExtensions( + List allowedUnauthorizedActionsExtensions) { + this.allowedUnauthorizedActionsExtensions = allowedUnauthorizedActionsExtensions; + return this; + } + + /** + * Get the authorizationActionMappings property: The authorization action mappings. + * + * @return the authorizationActionMappings value. + */ + public List authorizationActionMappings() { + return this.authorizationActionMappings; + } + + /** + * Set the authorizationActionMappings property: The authorization action mappings. + * + * @param authorizationActionMappings the authorizationActionMappings value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withAuthorizationActionMappings(List authorizationActionMappings) { + this.authorizationActionMappings = authorizationActionMappings; + return this; + } + + /** + * Get the linkedAccessChecks property: The linked access checks. + * + * @return the linkedAccessChecks value. + */ + public List linkedAccessChecks() { + return this.linkedAccessChecks; + } + + /** + * Set the linkedAccessChecks property: The linked access checks. + * + * @param linkedAccessChecks the linkedAccessChecks value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withLinkedAccessChecks(List linkedAccessChecks) { + this.linkedAccessChecks = linkedAccessChecks; + return this; + } + + /** + * Get the defaultApiVersion property: The default api version. + * + * @return the defaultApiVersion value. + */ + public String defaultApiVersion() { + return this.defaultApiVersion; + } + + /** + * Set the defaultApiVersion property: The default api version. + * + * @param defaultApiVersion the defaultApiVersion value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withDefaultApiVersion(String defaultApiVersion) { + this.defaultApiVersion = defaultApiVersion; + return this; + } + + /** + * Get the loggingRules property: The logging rules. + * + * @return the loggingRules value. + */ + public List loggingRules() { + return this.loggingRules; + } + + /** + * Set the loggingRules property: The logging rules. + * + * @param loggingRules the loggingRules value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withLoggingRules(List loggingRules) { + this.loggingRules = loggingRules; + return this; + } + + /** + * Get the throttlingRules property: The throttling rules. + * + * @return the throttlingRules value. + */ + public List throttlingRules() { + return this.throttlingRules; + } + + /** + * Set the throttlingRules property: The throttling rules. + * + * @param throttlingRules the throttlingRules value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withThrottlingRules(List throttlingRules) { + this.throttlingRules = throttlingRules; + return this; + } + + /** + * Get the requiredFeatures property: The required features. + * + * @return the requiredFeatures value. + */ + public List requiredFeatures() { + return this.requiredFeatures; + } + + /** + * Set the requiredFeatures property: The required features. + * + * @param requiredFeatures the requiredFeatures value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withRequiredFeatures(List requiredFeatures) { + this.requiredFeatures = requiredFeatures; + return this; + } + + /** + * Get the featuresRule property: The features rule. + * + * @return the featuresRule value. + */ + public ResourceTypeRegistrationPropertiesFeaturesRule featuresRule() { + return this.featuresRule; + } + + /** + * Set the featuresRule property: The features rule. + * + * @param featuresRule the featuresRule value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withFeaturesRule(ResourceTypeRegistrationPropertiesFeaturesRule featuresRule) { + this.featuresRule = featuresRule; + return this; + } + + /** + * Get the enableAsyncOperation property: Whether async operation is enabled. + * + * @return the enableAsyncOperation value. + */ + public Boolean enableAsyncOperation() { + return this.enableAsyncOperation; + } + + /** + * Set the enableAsyncOperation property: Whether async operation is enabled. + * + * @param enableAsyncOperation the enableAsyncOperation value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withEnableAsyncOperation(Boolean enableAsyncOperation) { + this.enableAsyncOperation = enableAsyncOperation; + return this; + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the enableThirdPartyS2S property: Whether third party S2S is enabled. + * + * @return the enableThirdPartyS2S value. + */ + public Boolean enableThirdPartyS2S() { + return this.enableThirdPartyS2S; + } + + /** + * Set the enableThirdPartyS2S property: Whether third party S2S is enabled. + * + * @param enableThirdPartyS2S the enableThirdPartyS2S value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withEnableThirdPartyS2S(Boolean enableThirdPartyS2S) { + this.enableThirdPartyS2S = enableThirdPartyS2S; + return this; + } + + /** + * Get the subscriptionLifecycleNotificationSpecifications property: The subscription lifecycle notification + * specifications. + * + * @return the subscriptionLifecycleNotificationSpecifications value. + */ + public ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + subscriptionLifecycleNotificationSpecifications() { + return this.subscriptionLifecycleNotificationSpecifications; + } + + /** + * Set the subscriptionLifecycleNotificationSpecifications property: The subscription lifecycle notification + * specifications. + * + * @param subscriptionLifecycleNotificationSpecifications the subscriptionLifecycleNotificationSpecifications value + * to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withSubscriptionLifecycleNotificationSpecifications( + ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications) { + this.subscriptionLifecycleNotificationSpecifications = subscriptionLifecycleNotificationSpecifications; + return this; + } + + /** + * Get the isPureProxy property: Whether it is pure proxy. + * + * @return the isPureProxy value. + */ + public Boolean isPureProxy() { + return this.isPureProxy; + } + + /** + * Set the isPureProxy property: Whether it is pure proxy. + * + * @param isPureProxy the isPureProxy value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withIsPureProxy(Boolean isPureProxy) { + this.isPureProxy = isPureProxy; + return this; + } + + /** + * Get the identityManagement property: The identity management. + * + * @return the identityManagement value. + */ + public ResourceTypeRegistrationPropertiesIdentityManagement identityManagement() { + return this.identityManagement; + } + + /** + * Set the identityManagement property: The identity management. + * + * @param identityManagement the identityManagement value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withIdentityManagement(ResourceTypeRegistrationPropertiesIdentityManagement identityManagement) { + this.identityManagement = identityManagement; + return this; + } + + /** + * Get the checkNameAvailabilitySpecifications property: The check name availability specifications. + * + * @return the checkNameAvailabilitySpecifications value. + */ + public ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications() { + return this.checkNameAvailabilitySpecifications; + } + + /** + * Set the checkNameAvailabilitySpecifications property: The check name availability specifications. + * + * @param checkNameAvailabilitySpecifications the checkNameAvailabilitySpecifications value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withCheckNameAvailabilitySpecifications( + ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications) { + this.checkNameAvailabilitySpecifications = checkNameAvailabilitySpecifications; + return this; + } + + /** + * Get the disallowedActionVerbs property: The disallowed action verbs. + * + * @return the disallowedActionVerbs value. + */ + public List disallowedActionVerbs() { + return this.disallowedActionVerbs; + } + + /** + * Set the disallowedActionVerbs property: The disallowed action verbs. + * + * @param disallowedActionVerbs the disallowedActionVerbs value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withDisallowedActionVerbs(List disallowedActionVerbs) { + this.disallowedActionVerbs = disallowedActionVerbs; + return this; + } + + /** + * Get the serviceTreeInfos property: The service tree infos. + * + * @return the serviceTreeInfos value. + */ + public List serviceTreeInfos() { + return this.serviceTreeInfos; + } + + /** + * Set the serviceTreeInfos property: The service tree infos. + * + * @param serviceTreeInfos the serviceTreeInfos value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withServiceTreeInfos(List serviceTreeInfos) { + this.serviceTreeInfos = serviceTreeInfos; + return this; + } + + /** + * Get the requestHeaderOptions property: The request header options. + * + * @return the requestHeaderOptions value. + */ + public ResourceTypeRegistrationPropertiesRequestHeaderOptions requestHeaderOptions() { + return this.requestHeaderOptions; + } + + /** + * Set the requestHeaderOptions property: The request header options. + * + * @param requestHeaderOptions the requestHeaderOptions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withRequestHeaderOptions(ResourceTypeRegistrationPropertiesRequestHeaderOptions requestHeaderOptions) { + this.requestHeaderOptions = requestHeaderOptions; + return this; + } + + /** + * Get the subscriptionStateRules property: The subscription state rules. + * + * @return the subscriptionStateRules value. + */ + public List subscriptionStateRules() { + return this.subscriptionStateRules; + } + + /** + * Set the subscriptionStateRules property: The subscription state rules. + * + * @param subscriptionStateRules the subscriptionStateRules value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withSubscriptionStateRules(List subscriptionStateRules) { + this.subscriptionStateRules = subscriptionStateRules; + return this; + } + + /** + * Get the templateDeploymentOptions property: The template deployment options. + * + * @return the templateDeploymentOptions value. + */ + public ResourceTypeRegistrationPropertiesTemplateDeploymentOptions templateDeploymentOptions() { + return this.templateDeploymentOptions; + } + + /** + * Set the templateDeploymentOptions property: The template deployment options. + * + * @param templateDeploymentOptions the templateDeploymentOptions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withTemplateDeploymentOptions( + ResourceTypeRegistrationPropertiesTemplateDeploymentOptions templateDeploymentOptions) { + this.templateDeploymentOptions = templateDeploymentOptions; + return this; + } + + /** + * Get the extendedLocations property: The extended locations. + * + * @return the extendedLocations value. + */ + public List extendedLocations() { + return this.extendedLocations; + } + + /** + * Set the extendedLocations property: The extended locations. + * + * @param extendedLocations the extendedLocations value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withExtendedLocations(List extendedLocations) { + this.extendedLocations = extendedLocations; + return this; + } + + /** + * Get the resourceMovePolicy property: The resource move policy. + * + * @return the resourceMovePolicy value. + */ + public ResourceTypeRegistrationPropertiesResourceMovePolicy resourceMovePolicy() { + return this.resourceMovePolicy; + } + + /** + * Set the resourceMovePolicy property: The resource move policy. + * + * @param resourceMovePolicy the resourceMovePolicy value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withResourceMovePolicy(ResourceTypeRegistrationPropertiesResourceMovePolicy resourceMovePolicy) { + this.resourceMovePolicy = resourceMovePolicy; + return this; + } + + /** + * Get the resourceDeletionPolicy property: The resource deletion policy. + * + * @return the resourceDeletionPolicy value. + */ + public ResourceDeletionPolicy resourceDeletionPolicy() { + return this.resourceDeletionPolicy; + } + + /** + * Set the resourceDeletionPolicy property: The resource deletion policy. + * + * @param resourceDeletionPolicy the resourceDeletionPolicy value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withResourceDeletionPolicy(ResourceDeletionPolicy resourceDeletionPolicy) { + this.resourceDeletionPolicy = resourceDeletionPolicy; + return this; + } + + /** + * Get the resourceConcurrencyControlOptions property: The resource concurrency control options. + * + * @return the resourceConcurrencyControlOptions value. + */ + public Map resourceConcurrencyControlOptions() { + return this.resourceConcurrencyControlOptions; + } + + /** + * Set the resourceConcurrencyControlOptions property: The resource concurrency control options. + * + * @param resourceConcurrencyControlOptions the resourceConcurrencyControlOptions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withResourceConcurrencyControlOptions( + Map resourceConcurrencyControlOptions) { + this.resourceConcurrencyControlOptions = resourceConcurrencyControlOptions; + return this; + } + + /** + * Get the resourceGraphConfiguration property: The resource graph configuration. + * + * @return the resourceGraphConfiguration value. + */ + public ResourceTypeRegistrationPropertiesResourceGraphConfiguration resourceGraphConfiguration() { + return this.resourceGraphConfiguration; + } + + /** + * Set the resourceGraphConfiguration property: The resource graph configuration. + * + * @param resourceGraphConfiguration the resourceGraphConfiguration value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withResourceGraphConfiguration( + ResourceTypeRegistrationPropertiesResourceGraphConfiguration resourceGraphConfiguration) { + this.resourceGraphConfiguration = resourceGraphConfiguration; + return this; + } + + /** + * Get the management property: The resource provider management. + * + * @return the management value. + */ + public ResourceTypeRegistrationPropertiesManagement management() { + return this.management; + } + + /** + * Set the management property: The resource provider management. + * + * @param management the management value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withManagement(ResourceTypeRegistrationPropertiesManagement management) { + this.management = management; + return this; + } + + /** + * Get the openApiConfiguration property: The open api configuration. + * + * @return the openApiConfiguration value. + */ + public OpenApiConfiguration openApiConfiguration() { + return this.openApiConfiguration; + } + + /** + * Set the openApiConfiguration property: The open api configuration. + * + * @param openApiConfiguration the openApiConfiguration value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withOpenApiConfiguration(OpenApiConfiguration openApiConfiguration) { + this.openApiConfiguration = openApiConfiguration; + return this; + } + + /** + * Get the onBehalfOfTokens property: The on behalf of tokens. + * + * @return the onBehalfOfTokens value. + */ + public ResourceTypeOnBehalfOfToken onBehalfOfTokens() { + return this.onBehalfOfTokens; + } + + /** + * Set the onBehalfOfTokens property: The on behalf of tokens. + * + * @param onBehalfOfTokens the onBehalfOfTokens value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withOnBehalfOfTokens(ResourceTypeOnBehalfOfToken onBehalfOfTokens) { + this.onBehalfOfTokens = onBehalfOfTokens; + return this; + } + + /** + * Get the category property: The category. + * + * @return the category value. + */ + public ResourceTypeCategory category() { + return this.category; + } + + /** + * Set the category property: The category. + * + * @param category the category value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withCategory(ResourceTypeCategory category) { + this.category = category; + return this; + } + + /** + * Get the resourceValidation property: The resource validation. + * + * @return the resourceValidation value. + */ + public ResourceValidation resourceValidation() { + return this.resourceValidation; + } + + /** + * Set the resourceValidation property: The resource validation. + * + * @param resourceValidation the resourceValidation value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withResourceValidation(ResourceValidation resourceValidation) { + this.resourceValidation = resourceValidation; + return this; + } + + /** + * Get the disallowedEndUserOperations property: The disallowed end user operations. + * + * @return the disallowedEndUserOperations value. + */ + public List disallowedEndUserOperations() { + return this.disallowedEndUserOperations; + } + + /** + * Set the disallowedEndUserOperations property: The disallowed end user operations. + * + * @param disallowedEndUserOperations the disallowedEndUserOperations value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withDisallowedEndUserOperations(List disallowedEndUserOperations) { + this.disallowedEndUserOperations = disallowedEndUserOperations; + return this; + } + + /** + * Get the metadata property: The metadata. + * + * @return the metadata value. + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set the metadata property: The metadata. + * + * @param metadata the metadata value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the skuLink property: The sku link. + * + * @return the skuLink value. + */ + public String skuLink() { + return this.skuLink; + } + + /** + * Set the skuLink property: The sku link. + * + * @param skuLink the skuLink value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withSkuLink(String skuLink) { + this.skuLink = skuLink; + return this; + } + + /** + * Get the quotaRule property: The quota rule. + * + * @return the quotaRule value. + */ + public QuotaRule quotaRule() { + return this.quotaRule; + } + + /** + * Set the quotaRule property: The quota rule. + * + * @param quotaRule the quotaRule value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withQuotaRule(QuotaRule quotaRule) { + this.quotaRule = quotaRule; + return this; + } + + /** + * Get the notifications property: The notifications. + * + * @return the notifications value. + */ + public List notifications() { + return this.notifications; + } + + /** + * Set the notifications property: The notifications. + * + * @param notifications the notifications value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withNotifications(List notifications) { + this.notifications = notifications; + return this; + } + + /** + * Get the linkedNotificationRules property: The linked notification rules. + * + * @return the linkedNotificationRules value. + */ + public List linkedNotificationRules() { + return this.linkedNotificationRules; + } + + /** + * Set the linkedNotificationRules property: The linked notification rules. + * + * @param linkedNotificationRules the linkedNotificationRules value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withLinkedNotificationRules(List linkedNotificationRules) { + this.linkedNotificationRules = linkedNotificationRules; + return this; + } + + /** + * Get the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @return the resourceProviderAuthorizationRules value. + */ + public ResourceProviderAuthorizationRules resourceProviderAuthorizationRules() { + return this.resourceProviderAuthorizationRules; + } + + /** + * Set the resourceProviderAuthorizationRules property: The resource provider authorization rules. + * + * @param resourceProviderAuthorizationRules the resourceProviderAuthorizationRules value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withResourceProviderAuthorizationRules(ResourceProviderAuthorizationRules resourceProviderAuthorizationRules) { + this.resourceProviderAuthorizationRules = resourceProviderAuthorizationRules; + return this; + } + + /** + * Get the tokenAuthConfiguration property: The token auth configuration. + * + * @return the tokenAuthConfiguration value. + */ + public TokenAuthConfiguration tokenAuthConfiguration() { + return this.tokenAuthConfiguration; + } + + /** + * Set the tokenAuthConfiguration property: The token auth configuration. + * + * @param tokenAuthConfiguration the tokenAuthConfiguration value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withTokenAuthConfiguration(TokenAuthConfiguration tokenAuthConfiguration) { + this.tokenAuthConfiguration = tokenAuthConfiguration; + return this; + } + + /** + * Get the templateDeploymentPolicy property: The template deployment policy. + * + * @return the templateDeploymentPolicy value. + */ + public ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy templateDeploymentPolicy() { + return this.templateDeploymentPolicy; + } + + /** + * Set the templateDeploymentPolicy property: The template deployment policy. + * + * @param templateDeploymentPolicy the templateDeploymentPolicy value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withTemplateDeploymentPolicy( + ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy templateDeploymentPolicy) { + this.templateDeploymentPolicy = templateDeploymentPolicy; + return this; + } + + /** + * Get the allowEmptyRoleAssignments property: The allow empty role assignments. + * + * @return the allowEmptyRoleAssignments value. + */ + public Boolean allowEmptyRoleAssignments() { + return this.allowEmptyRoleAssignments; + } + + /** + * Set the allowEmptyRoleAssignments property: The allow empty role assignments. + * + * @param allowEmptyRoleAssignments the allowEmptyRoleAssignments value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withAllowEmptyRoleAssignments(Boolean allowEmptyRoleAssignments) { + this.allowEmptyRoleAssignments = allowEmptyRoleAssignments; + return this; + } + + /** + * Get the policyExecutionType property: The policy execution type. + * + * @return the policyExecutionType value. + */ + public PolicyExecutionType policyExecutionType() { + return this.policyExecutionType; + } + + /** + * Set the policyExecutionType property: The policy execution type. + * + * @param policyExecutionType the policyExecutionType value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withPolicyExecutionType(PolicyExecutionType policyExecutionType) { + this.policyExecutionType = policyExecutionType; + return this; + } + + /** + * Get the availabilityZoneRule property: The availability zone rule. + * + * @return the availabilityZoneRule value. + */ + public ResourceTypeRegistrationPropertiesAvailabilityZoneRule availabilityZoneRule() { + return this.availabilityZoneRule; + } + + /** + * Set the availabilityZoneRule property: The availability zone rule. + * + * @param availabilityZoneRule the availabilityZoneRule value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withAvailabilityZoneRule(ResourceTypeRegistrationPropertiesAvailabilityZoneRule availabilityZoneRule) { + this.availabilityZoneRule = availabilityZoneRule; + return this; + } + + /** + * Get the dstsConfiguration property: The dsts configuration. + * + * @return the dstsConfiguration value. + */ + public ResourceTypeRegistrationPropertiesDstsConfiguration dstsConfiguration() { + return this.dstsConfiguration; + } + + /** + * Set the dstsConfiguration property: The dsts configuration. + * + * @param dstsConfiguration the dstsConfiguration value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withDstsConfiguration(ResourceTypeRegistrationPropertiesDstsConfiguration dstsConfiguration) { + this.dstsConfiguration = dstsConfiguration; + return this; + } + /** - * Creates an instance of ResourceTypeRegistrationProperties class. + * Get the asyncTimeoutRules property: Async timeout rules. + * + * @return the asyncTimeoutRules value. */ - public ResourceTypeRegistrationProperties() { + public List asyncTimeoutRules() { + return this.asyncTimeoutRules; } /** - * {@inheritDoc} + * Set the asyncTimeoutRules property: Async timeout rules. + * + * @param asyncTimeoutRules the asyncTimeoutRules value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override - public ResourceTypeRegistrationProperties withRoutingType(RoutingType routingType) { - super.withRoutingType(routingType); + public ResourceTypeRegistrationProperties withAsyncTimeoutRules(List asyncTimeoutRules) { + this.asyncTimeoutRules = asyncTimeoutRules; return this; } /** - * {@inheritDoc} + * Get the commonApiVersions property: Common API versions for the resource type. + * + * @return the commonApiVersions value. */ - @Override - public ResourceTypeRegistrationProperties withRegionality(Regionality regionality) { - super.withRegionality(regionality); - return this; + public List commonApiVersions() { + return this.commonApiVersions; } /** - * {@inheritDoc} + * Set the commonApiVersions property: Common API versions for the resource type. + * + * @param commonApiVersions the commonApiVersions value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override - public ResourceTypeRegistrationProperties withEndpoints(List endpoints) { - super.withEndpoints(endpoints); + public ResourceTypeRegistrationProperties withCommonApiVersions(List commonApiVersions) { + this.commonApiVersions = commonApiVersions; return this; } /** - * {@inheritDoc} + * Get the apiProfiles property: The api profiles. + * + * @return the apiProfiles value. */ - @Override - public ResourceTypeRegistrationProperties - withExtensionOptions(ResourceTypeRegistrationPropertiesExtensionOptions extensionOptions) { - super.withExtensionOptions(extensionOptions); + public List apiProfiles() { + return this.apiProfiles; + } + + /** + * Set the apiProfiles property: The api profiles. + * + * @param apiProfiles the apiProfiles value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withApiProfiles(List apiProfiles) { + this.apiProfiles = apiProfiles; return this; } /** - * {@inheritDoc} + * Get the linkedOperationRules property: The linked operation rules. + * + * @return the linkedOperationRules value. */ - @Override - public ResourceTypeRegistrationProperties withMarketplaceType(MarketplaceType marketplaceType) { - super.withMarketplaceType(marketplaceType); + public List linkedOperationRules() { + return this.linkedOperationRules; + } + + /** + * Set the linkedOperationRules property: The linked operation rules. + * + * @param linkedOperationRules the linkedOperationRules value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withLinkedOperationRules(List linkedOperationRules) { + this.linkedOperationRules = linkedOperationRules; return this; } /** - * {@inheritDoc} + * Get the legacyName property: The legacy name. + * + * @return the legacyName value. */ - @Override - public ResourceTypeRegistrationProperties - withSwaggerSpecifications(List swaggerSpecifications) { - super.withSwaggerSpecifications(swaggerSpecifications); + public String legacyName() { + return this.legacyName; + } + + /** + * Set the legacyName property: The legacy name. + * + * @param legacyName the legacyName value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withLegacyName(String legacyName) { + this.legacyName = legacyName; return this; } /** - * {@inheritDoc} + * Get the legacyNames property: The legacy names. + * + * @return the legacyNames value. */ - @Override - public ResourceTypeRegistrationProperties withAllowedUnauthorizedActions(List allowedUnauthorizedActions) { - super.withAllowedUnauthorizedActions(allowedUnauthorizedActions); + public List legacyNames() { + return this.legacyNames; + } + + /** + * Set the legacyNames property: The legacy names. + * + * @param legacyNames the legacyNames value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withLegacyNames(List legacyNames) { + this.legacyNames = legacyNames; return this; } /** - * {@inheritDoc} + * Get the allowedTemplateDeploymentReferenceActions property: Allowed template deployment reference actions. + * + * @return the allowedTemplateDeploymentReferenceActions value. + */ + public List allowedTemplateDeploymentReferenceActions() { + return this.allowedTemplateDeploymentReferenceActions; + } + + /** + * Set the allowedTemplateDeploymentReferenceActions property: Allowed template deployment reference actions. + * + * @param allowedTemplateDeploymentReferenceActions the allowedTemplateDeploymentReferenceActions value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override public ResourceTypeRegistrationProperties - withAuthorizationActionMappings(List authorizationActionMappings) { - super.withAuthorizationActionMappings(authorizationActionMappings); + withAllowedTemplateDeploymentReferenceActions(List allowedTemplateDeploymentReferenceActions) { + this.allowedTemplateDeploymentReferenceActions = allowedTemplateDeploymentReferenceActions; return this; } /** - * {@inheritDoc} + * Get the legacyPolicy property: The legacy policy. + * + * @return the legacyPolicy value. */ - @Override - public ResourceTypeRegistrationProperties withLinkedAccessChecks(List linkedAccessChecks) { - super.withLinkedAccessChecks(linkedAccessChecks); - return this; + public ResourceTypeRegistrationPropertiesLegacyPolicy legacyPolicy() { + return this.legacyPolicy; } /** - * {@inheritDoc} + * Set the legacyPolicy property: The legacy policy. + * + * @param legacyPolicy the legacyPolicy value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override - public ResourceTypeRegistrationProperties withDefaultApiVersion(String defaultApiVersion) { - super.withDefaultApiVersion(defaultApiVersion); + public ResourceTypeRegistrationProperties + withLegacyPolicy(ResourceTypeRegistrationPropertiesLegacyPolicy legacyPolicy) { + this.legacyPolicy = legacyPolicy; return this; } /** - * {@inheritDoc} + * Get the manifestLink property: Manifest link. + * + * @return the manifestLink value. */ - @Override - public ResourceTypeRegistrationProperties withLoggingRules(List loggingRules) { - super.withLoggingRules(loggingRules); - return this; + public String manifestLink() { + return this.manifestLink; } /** - * {@inheritDoc} + * Set the manifestLink property: Manifest link. + * + * @param manifestLink the manifestLink value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override - public ResourceTypeRegistrationProperties withThrottlingRules(List throttlingRules) { - super.withThrottlingRules(throttlingRules); + public ResourceTypeRegistrationProperties withManifestLink(String manifestLink) { + this.manifestLink = manifestLink; return this; } /** - * {@inheritDoc} + * Get the capacityRule property: Capacity rule. + * + * @return the capacityRule value. */ - @Override - public ResourceTypeRegistrationProperties withRequiredFeatures(List requiredFeatures) { - super.withRequiredFeatures(requiredFeatures); - return this; + public ResourceTypeRegistrationPropertiesCapacityRule capacityRule() { + return this.capacityRule; } /** - * {@inheritDoc} + * Set the capacityRule property: Capacity rule. + * + * @param capacityRule the capacityRule value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override public ResourceTypeRegistrationProperties - withFeaturesRule(ResourceTypeRegistrationPropertiesFeaturesRule featuresRule) { - super.withFeaturesRule(featuresRule); + withCapacityRule(ResourceTypeRegistrationPropertiesCapacityRule capacityRule) { + this.capacityRule = capacityRule; return this; } /** - * {@inheritDoc} + * Get the marketplaceOptions property: Marketplace options. + * + * @return the marketplaceOptions value. */ - @Override - public ResourceTypeRegistrationProperties withEnableAsyncOperation(Boolean enableAsyncOperation) { - super.withEnableAsyncOperation(enableAsyncOperation); - return this; + public ResourceTypeRegistrationPropertiesMarketplaceOptions marketplaceOptions() { + return this.marketplaceOptions; } /** - * {@inheritDoc} + * Set the marketplaceOptions property: Marketplace options. + * + * @param marketplaceOptions the marketplaceOptions value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override - public ResourceTypeRegistrationProperties withProvisioningState(ProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); + public ResourceTypeRegistrationProperties + withMarketplaceOptions(ResourceTypeRegistrationPropertiesMarketplaceOptions marketplaceOptions) { + this.marketplaceOptions = marketplaceOptions; return this; } /** - * {@inheritDoc} + * Get the allowedResourceNames property: The allowed resource names. + * + * @return the allowedResourceNames value. */ - @Override - public ResourceTypeRegistrationProperties withEnableThirdPartyS2S(Boolean enableThirdPartyS2S) { - super.withEnableThirdPartyS2S(enableThirdPartyS2S); - return this; + public List allowedResourceNames() { + return this.allowedResourceNames; } /** - * {@inheritDoc} + * Set the allowedResourceNames property: The allowed resource names. + * + * @param allowedResourceNames the allowedResourceNames value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override - public ResourceTypeRegistrationProperties withSubscriptionLifecycleNotificationSpecifications( - ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications) { - super.withSubscriptionLifecycleNotificationSpecifications(subscriptionLifecycleNotificationSpecifications); + public ResourceTypeRegistrationProperties withAllowedResourceNames(List allowedResourceNames) { + this.allowedResourceNames = allowedResourceNames; return this; } /** - * {@inheritDoc} + * Get the resourceCache property: Resource cache options. + * + * @return the resourceCache value. */ - @Override - public ResourceTypeRegistrationProperties withIsPureProxy(Boolean isPureProxy) { - super.withIsPureProxy(isPureProxy); + public ResourceTypeRegistrationPropertiesResourceCache resourceCache() { + return this.resourceCache; + } + + /** + * Set the resourceCache property: Resource cache options. + * + * @param resourceCache the resourceCache value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withResourceCache(ResourceTypeRegistrationPropertiesResourceCache resourceCache) { + this.resourceCache = resourceCache; return this; } /** - * {@inheritDoc} + * Get the resourceQueryManagement property: Resource query management options. + * + * @return the resourceQueryManagement value. + */ + public ResourceTypeRegistrationPropertiesResourceQueryManagement resourceQueryManagement() { + return this.resourceQueryManagement; + } + + /** + * Set the resourceQueryManagement property: Resource query management options. + * + * @param resourceQueryManagement the resourceQueryManagement value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override public ResourceTypeRegistrationProperties - withIdentityManagement(ResourceTypeRegistrationPropertiesIdentityManagement identityManagement) { - super.withIdentityManagement(identityManagement); + withResourceQueryManagement(ResourceTypeRegistrationPropertiesResourceQueryManagement resourceQueryManagement) { + this.resourceQueryManagement = resourceQueryManagement; return this; } /** - * {@inheritDoc} + * Get the supportsTags property: Whether tags are supported. + * + * @return the supportsTags value. */ - @Override - public ResourceTypeRegistrationProperties withCheckNameAvailabilitySpecifications( - ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications) { - super.withCheckNameAvailabilitySpecifications(checkNameAvailabilitySpecifications); + public Boolean supportsTags() { + return this.supportsTags; + } + + /** + * Set the supportsTags property: Whether tags are supported. + * + * @param supportsTags the supportsTags value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withSupportsTags(Boolean supportsTags) { + this.supportsTags = supportsTags; return this; } /** - * {@inheritDoc} + * Get the resourceManagementOptions property: Resource management options. + * + * @return the resourceManagementOptions value. */ - @Override - public ResourceTypeRegistrationProperties withDisallowedActionVerbs(List disallowedActionVerbs) { - super.withDisallowedActionVerbs(disallowedActionVerbs); + public ResourceTypeRegistrationPropertiesResourceManagementOptions resourceManagementOptions() { + return this.resourceManagementOptions; + } + + /** + * Set the resourceManagementOptions property: Resource management options. + * + * @param resourceManagementOptions the resourceManagementOptions value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withResourceManagementOptions( + ResourceTypeRegistrationPropertiesResourceManagementOptions resourceManagementOptions) { + this.resourceManagementOptions = resourceManagementOptions; return this; } /** - * {@inheritDoc} + * Get the groupingTag property: Grouping tag. + * + * @return the groupingTag value. */ - @Override - public ResourceTypeRegistrationProperties withServiceTreeInfos(List serviceTreeInfos) { - super.withServiceTreeInfos(serviceTreeInfos); + public String groupingTag() { + return this.groupingTag; + } + + /** + * Set the groupingTag property: Grouping tag. + * + * @param groupingTag the groupingTag value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withGroupingTag(String groupingTag) { + this.groupingTag = groupingTag; return this; } /** - * {@inheritDoc} + * Get the addResourceListTargetLocations property: Add resource list target locations?. + * + * @return the addResourceListTargetLocations value. + */ + public Boolean addResourceListTargetLocations() { + return this.addResourceListTargetLocations; + } + + /** + * Set the addResourceListTargetLocations property: Add resource list target locations?. + * + * @param addResourceListTargetLocations the addResourceListTargetLocations value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override public ResourceTypeRegistrationProperties - withRequestHeaderOptions(ResourceTypeRegistrationPropertiesRequestHeaderOptions requestHeaderOptions) { - super.withRequestHeaderOptions(requestHeaderOptions); + withAddResourceListTargetLocations(Boolean addResourceListTargetLocations) { + this.addResourceListTargetLocations = addResourceListTargetLocations; return this; } /** - * {@inheritDoc} + * Get the resourceTypeCommonAttributeManagement property: Resource type common attribute management. + * + * @return the resourceTypeCommonAttributeManagement value. */ - @Override - public ResourceTypeRegistrationProperties - withSubscriptionStateRules(List subscriptionStateRules) { - super.withSubscriptionStateRules(subscriptionStateRules); + public ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement + resourceTypeCommonAttributeManagement() { + return this.resourceTypeCommonAttributeManagement; + } + + /** + * Set the resourceTypeCommonAttributeManagement property: Resource type common attribute management. + * + * @param resourceTypeCommonAttributeManagement the resourceTypeCommonAttributeManagement value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withResourceTypeCommonAttributeManagement( + ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement resourceTypeCommonAttributeManagement) { + this.resourceTypeCommonAttributeManagement = resourceTypeCommonAttributeManagement; return this; } /** - * {@inheritDoc} + * Get the routingRule property: Routing rule. + * + * @return the routingRule value. */ - @Override - public ResourceTypeRegistrationProperties withTemplateDeploymentOptions( - ResourceTypeRegistrationPropertiesTemplateDeploymentOptions templateDeploymentOptions) { - super.withTemplateDeploymentOptions(templateDeploymentOptions); + public ResourceTypeRegistrationPropertiesRoutingRule routingRule() { + return this.routingRule; + } + + /** + * Set the routingRule property: Routing rule. + * + * @param routingRule the routingRule value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties + withRoutingRule(ResourceTypeRegistrationPropertiesRoutingRule routingRule) { + this.routingRule = routingRule; return this; } /** - * {@inheritDoc} + * Get the frontdoorRequestMode property: The frontdoor request mode. + * + * @return the frontdoorRequestMode value. */ - @Override - public ResourceTypeRegistrationProperties withExtendedLocations(List extendedLocations) { - super.withExtendedLocations(extendedLocations); + public FrontdoorRequestMode frontdoorRequestMode() { + return this.frontdoorRequestMode; + } + + /** + * Set the frontdoorRequestMode property: The frontdoor request mode. + * + * @param frontdoorRequestMode the frontdoorRequestMode value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withFrontdoorRequestMode(FrontdoorRequestMode frontdoorRequestMode) { + this.frontdoorRequestMode = frontdoorRequestMode; return this; } /** - * {@inheritDoc} + * Get the resourceSubType property: The resource sub type. + * + * @return the resourceSubType value. */ - @Override - public ResourceTypeRegistrationProperties - withResourceMovePolicy(ResourceTypeRegistrationPropertiesResourceMovePolicy resourceMovePolicy) { - super.withResourceMovePolicy(resourceMovePolicy); + public ResourceSubType resourceSubType() { + return this.resourceSubType; + } + + /** + * Set the resourceSubType property: The resource sub type. + * + * @param resourceSubType the resourceSubType value to set. + * @return the ResourceTypeRegistrationProperties object itself. + */ + public ResourceTypeRegistrationProperties withResourceSubType(ResourceSubType resourceSubType) { + this.resourceSubType = resourceSubType; return this; } /** - * {@inheritDoc} + * Get the asyncOperationResourceTypeName property: The async operation resource type name. + * + * @return the asyncOperationResourceTypeName value. + */ + public String asyncOperationResourceTypeName() { + return this.asyncOperationResourceTypeName; + } + + /** + * Set the asyncOperationResourceTypeName property: The async operation resource type name. + * + * @param asyncOperationResourceTypeName the asyncOperationResourceTypeName value to set. + * @return the ResourceTypeRegistrationProperties object itself. */ - @Override public ResourceTypeRegistrationProperties - withResourceDeletionPolicy(ResourceDeletionPolicy resourceDeletionPolicy) { - super.withResourceDeletionPolicy(resourceDeletionPolicy); + withAsyncOperationResourceTypeName(String asyncOperationResourceTypeName) { + this.asyncOperationResourceTypeName = asyncOperationResourceTypeName; return this; } @@ -300,7 +1933,6 @@ public ResourceTypeRegistrationProperties withExtendedLocations(List e.validate()); @@ -311,6 +1943,9 @@ public void validate() { if (swaggerSpecifications() != null) { swaggerSpecifications().forEach(e -> e.validate()); } + if (allowedUnauthorizedActionsExtensions() != null) { + allowedUnauthorizedActionsExtensions().forEach(e -> e.validate()); + } if (authorizationActionMappings() != null) { authorizationActionMappings().forEach(e -> e.validate()); } @@ -353,6 +1988,85 @@ public void validate() { if (resourceMovePolicy() != null) { resourceMovePolicy().validate(); } + if (resourceConcurrencyControlOptions() != null) { + resourceConcurrencyControlOptions().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (resourceGraphConfiguration() != null) { + resourceGraphConfiguration().validate(); + } + if (management() != null) { + management().validate(); + } + if (openApiConfiguration() != null) { + openApiConfiguration().validate(); + } + if (onBehalfOfTokens() != null) { + onBehalfOfTokens().validate(); + } + if (quotaRule() != null) { + quotaRule().validate(); + } + if (notifications() != null) { + notifications().forEach(e -> e.validate()); + } + if (linkedNotificationRules() != null) { + linkedNotificationRules().forEach(e -> e.validate()); + } + if (resourceProviderAuthorizationRules() != null) { + resourceProviderAuthorizationRules().validate(); + } + if (tokenAuthConfiguration() != null) { + tokenAuthConfiguration().validate(); + } + if (templateDeploymentPolicy() != null) { + templateDeploymentPolicy().validate(); + } + if (availabilityZoneRule() != null) { + availabilityZoneRule().validate(); + } + if (dstsConfiguration() != null) { + dstsConfiguration().validate(); + } + if (asyncTimeoutRules() != null) { + asyncTimeoutRules().forEach(e -> e.validate()); + } + if (apiProfiles() != null) { + apiProfiles().forEach(e -> e.validate()); + } + if (linkedOperationRules() != null) { + linkedOperationRules().forEach(e -> e.validate()); + } + if (legacyPolicy() != null) { + legacyPolicy().validate(); + } + if (capacityRule() != null) { + capacityRule().validate(); + } + if (marketplaceOptions() != null) { + marketplaceOptions().validate(); + } + if (allowedResourceNames() != null) { + allowedResourceNames().forEach(e -> e.validate()); + } + if (resourceCache() != null) { + resourceCache().validate(); + } + if (resourceQueryManagement() != null) { + resourceQueryManagement().validate(); + } + if (resourceManagementOptions() != null) { + resourceManagementOptions().validate(); + } + if (resourceTypeCommonAttributeManagement() != null) { + resourceTypeCommonAttributeManagement().validate(); + } + if (routingRule() != null) { + routingRule().validate(); + } } /** @@ -361,48 +2075,108 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("routingType", routingType() == null ? null : routingType().toString()); - jsonWriter.writeStringField("regionality", regionality() == null ? null : regionality().toString()); - jsonWriter.writeArrayField("endpoints", endpoints(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("extensionOptions", extensionOptions()); - jsonWriter.writeStringField("marketplaceType", marketplaceType() == null ? null : marketplaceType().toString()); - jsonWriter.writeArrayField("swaggerSpecifications", swaggerSpecifications(), + jsonWriter.writeStringField("routingType", this.routingType == null ? null : this.routingType.toString()); + jsonWriter.writeStringField("additionalOptions", + this.additionalOptions == null ? null : this.additionalOptions.toString()); + jsonWriter.writeStringField("crossTenantTokenValidation", + this.crossTenantTokenValidation == null ? null : this.crossTenantTokenValidation.toString()); + jsonWriter.writeStringField("regionality", this.regionality == null ? null : this.regionality.toString()); + jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("extensionOptions", this.extensionOptions); + jsonWriter.writeStringField("marketplaceType", + this.marketplaceType == null ? null : this.marketplaceType.toString()); + jsonWriter.writeArrayField("swaggerSpecifications", this.swaggerSpecifications, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("allowedUnauthorizedActions", allowedUnauthorizedActions(), + jsonWriter.writeArrayField("allowedUnauthorizedActions", this.allowedUnauthorizedActions, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("authorizationActionMappings", authorizationActionMappings(), + jsonWriter.writeArrayField("allowedUnauthorizedActionsExtensions", this.allowedUnauthorizedActionsExtensions, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("linkedAccessChecks", linkedAccessChecks(), + jsonWriter.writeArrayField("authorizationActionMappings", this.authorizationActionMappings, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("defaultApiVersion", defaultApiVersion()); - jsonWriter.writeArrayField("loggingRules", loggingRules(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("throttlingRules", throttlingRules(), + jsonWriter.writeArrayField("linkedAccessChecks", this.linkedAccessChecks, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("requiredFeatures", requiredFeatures(), + jsonWriter.writeStringField("defaultApiVersion", this.defaultApiVersion); + jsonWriter.writeArrayField("loggingRules", this.loggingRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("throttlingRules", this.throttlingRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("featuresRule", featuresRule()); - jsonWriter.writeBooleanField("enableAsyncOperation", enableAsyncOperation()); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); - jsonWriter.writeBooleanField("enableThirdPartyS2S", enableThirdPartyS2S()); + jsonWriter.writeJsonField("featuresRule", this.featuresRule); + jsonWriter.writeBooleanField("enableAsyncOperation", this.enableAsyncOperation); + jsonWriter.writeBooleanField("enableThirdPartyS2S", this.enableThirdPartyS2S); jsonWriter.writeJsonField("subscriptionLifecycleNotificationSpecifications", - subscriptionLifecycleNotificationSpecifications()); - jsonWriter.writeBooleanField("isPureProxy", isPureProxy()); - jsonWriter.writeJsonField("identityManagement", identityManagement()); - jsonWriter.writeJsonField("checkNameAvailabilitySpecifications", checkNameAvailabilitySpecifications()); - jsonWriter.writeArrayField("disallowedActionVerbs", disallowedActionVerbs(), + this.subscriptionLifecycleNotificationSpecifications); + jsonWriter.writeBooleanField("isPureProxy", this.isPureProxy); + jsonWriter.writeJsonField("identityManagement", this.identityManagement); + jsonWriter.writeJsonField("checkNameAvailabilitySpecifications", this.checkNameAvailabilitySpecifications); + jsonWriter.writeArrayField("disallowedActionVerbs", this.disallowedActionVerbs, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("serviceTreeInfos", serviceTreeInfos(), + jsonWriter.writeArrayField("serviceTreeInfos", this.serviceTreeInfos, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("requestHeaderOptions", requestHeaderOptions()); - jsonWriter.writeArrayField("subscriptionStateRules", subscriptionStateRules(), + jsonWriter.writeJsonField("requestHeaderOptions", this.requestHeaderOptions); + jsonWriter.writeArrayField("subscriptionStateRules", this.subscriptionStateRules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("templateDeploymentOptions", templateDeploymentOptions()); - jsonWriter.writeArrayField("extendedLocations", extendedLocations(), + jsonWriter.writeJsonField("templateDeploymentOptions", this.templateDeploymentOptions); + jsonWriter.writeArrayField("extendedLocations", this.extendedLocations, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resourceMovePolicy", resourceMovePolicy()); + jsonWriter.writeJsonField("resourceMovePolicy", this.resourceMovePolicy); jsonWriter.writeStringField("resourceDeletionPolicy", - resourceDeletionPolicy() == null ? null : resourceDeletionPolicy().toString()); + this.resourceDeletionPolicy == null ? null : this.resourceDeletionPolicy.toString()); + jsonWriter.writeMapField("resourceConcurrencyControlOptions", this.resourceConcurrencyControlOptions, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("resourceGraphConfiguration", this.resourceGraphConfiguration); + jsonWriter.writeJsonField("management", this.management); + jsonWriter.writeJsonField("openApiConfiguration", this.openApiConfiguration); + jsonWriter.writeJsonField("onBehalfOfTokens", this.onBehalfOfTokens); + jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString()); + jsonWriter.writeStringField("resourceValidation", + this.resourceValidation == null ? null : this.resourceValidation.toString()); + jsonWriter.writeArrayField("disallowedEndUserOperations", this.disallowedEndUserOperations, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeStringField("skuLink", this.skuLink); + jsonWriter.writeJsonField("quotaRule", this.quotaRule); + jsonWriter.writeArrayField("notifications", this.notifications, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("linkedNotificationRules", this.linkedNotificationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("resourceProviderAuthorizationRules", this.resourceProviderAuthorizationRules); + jsonWriter.writeJsonField("tokenAuthConfiguration", this.tokenAuthConfiguration); + jsonWriter.writeJsonField("templateDeploymentPolicy", this.templateDeploymentPolicy); + jsonWriter.writeBooleanField("allowEmptyRoleAssignments", this.allowEmptyRoleAssignments); + jsonWriter.writeStringField("policyExecutionType", + this.policyExecutionType == null ? null : this.policyExecutionType.toString()); + jsonWriter.writeJsonField("availabilityZoneRule", this.availabilityZoneRule); + jsonWriter.writeJsonField("dstsConfiguration", this.dstsConfiguration); + jsonWriter.writeArrayField("asyncTimeoutRules", this.asyncTimeoutRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("commonApiVersions", this.commonApiVersions, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("apiProfiles", this.apiProfiles, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("linkedOperationRules", this.linkedOperationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("legacyName", this.legacyName); + jsonWriter.writeArrayField("legacyNames", this.legacyNames, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("allowedTemplateDeploymentReferenceActions", + this.allowedTemplateDeploymentReferenceActions, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("legacyPolicy", this.legacyPolicy); + jsonWriter.writeStringField("manifestLink", this.manifestLink); + jsonWriter.writeJsonField("capacityRule", this.capacityRule); + jsonWriter.writeJsonField("marketplaceOptions", this.marketplaceOptions); + jsonWriter.writeArrayField("allowedResourceNames", this.allowedResourceNames, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("resourceCache", this.resourceCache); + jsonWriter.writeJsonField("resourceQueryManagement", this.resourceQueryManagement); + jsonWriter.writeBooleanField("supportsTags", this.supportsTags); + jsonWriter.writeJsonField("resourceManagementOptions", this.resourceManagementOptions); + jsonWriter.writeStringField("groupingTag", this.groupingTag); + jsonWriter.writeBooleanField("addResourceListTargetLocations", this.addResourceListTargetLocations); + jsonWriter.writeJsonField("resourceTypeCommonAttributeManagement", this.resourceTypeCommonAttributeManagement); + jsonWriter.writeJsonField("routingRule", this.routingRule); + jsonWriter.writeStringField("frontdoorRequestMode", + this.frontdoorRequestMode == null ? null : this.frontdoorRequestMode.toString()); + jsonWriter.writeStringField("resourceSubType", + this.resourceSubType == null ? null : this.resourceSubType.toString()); + jsonWriter.writeStringField("asyncOperationResourceTypeName", this.asyncOperationResourceTypeName); return jsonWriter.writeEndObject(); } @@ -423,102 +2197,245 @@ public static ResourceTypeRegistrationProperties fromJson(JsonReader jsonReader) reader.nextToken(); if ("routingType".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withRoutingType(RoutingType.fromString(reader.getString())); + deserializedResourceTypeRegistrationProperties.routingType + = RoutingType.fromString(reader.getString()); + } else if ("additionalOptions".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.additionalOptions + = AdditionalOptionsResourceTypeRegistration.fromString(reader.getString()); + } else if ("crossTenantTokenValidation".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.crossTenantTokenValidation + = CrossTenantTokenValidation.fromString(reader.getString()); } else if ("regionality".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withRegionality(Regionality.fromString(reader.getString())); + deserializedResourceTypeRegistrationProperties.regionality + = Regionality.fromString(reader.getString()); } else if ("endpoints".equals(fieldName)) { List endpoints = reader.readArray(reader1 -> ResourceTypeEndpoint.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withEndpoints(endpoints); + deserializedResourceTypeRegistrationProperties.endpoints = endpoints; } else if ("extensionOptions".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withExtensionOptions(ResourceTypeRegistrationPropertiesExtensionOptions.fromJson(reader)); + deserializedResourceTypeRegistrationProperties.extensionOptions + = ResourceTypeRegistrationPropertiesExtensionOptions.fromJson(reader); } else if ("marketplaceType".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withMarketplaceType(MarketplaceType.fromString(reader.getString())); + deserializedResourceTypeRegistrationProperties.marketplaceType + = MarketplaceType.fromString(reader.getString()); } else if ("swaggerSpecifications".equals(fieldName)) { List swaggerSpecifications = reader.readArray(reader1 -> SwaggerSpecification.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withSwaggerSpecifications(swaggerSpecifications); + deserializedResourceTypeRegistrationProperties.swaggerSpecifications = swaggerSpecifications; } else if ("allowedUnauthorizedActions".equals(fieldName)) { List allowedUnauthorizedActions = reader.readArray(reader1 -> reader1.getString()); - deserializedResourceTypeRegistrationProperties - .withAllowedUnauthorizedActions(allowedUnauthorizedActions); + deserializedResourceTypeRegistrationProperties.allowedUnauthorizedActions + = allowedUnauthorizedActions; + } else if ("allowedUnauthorizedActionsExtensions".equals(fieldName)) { + List allowedUnauthorizedActionsExtensions + = reader.readArray(reader1 -> AllowedUnauthorizedActionsExtension.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.allowedUnauthorizedActionsExtensions + = allowedUnauthorizedActionsExtensions; } else if ("authorizationActionMappings".equals(fieldName)) { List authorizationActionMappings = reader.readArray(reader1 -> AuthorizationActionMapping.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties - .withAuthorizationActionMappings(authorizationActionMappings); + deserializedResourceTypeRegistrationProperties.authorizationActionMappings + = authorizationActionMappings; } else if ("linkedAccessChecks".equals(fieldName)) { List linkedAccessChecks = reader.readArray(reader1 -> LinkedAccessCheck.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withLinkedAccessChecks(linkedAccessChecks); + deserializedResourceTypeRegistrationProperties.linkedAccessChecks = linkedAccessChecks; } else if ("defaultApiVersion".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties.withDefaultApiVersion(reader.getString()); + deserializedResourceTypeRegistrationProperties.defaultApiVersion = reader.getString(); } else if ("loggingRules".equals(fieldName)) { List loggingRules = reader.readArray(reader1 -> LoggingRule.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withLoggingRules(loggingRules); + deserializedResourceTypeRegistrationProperties.loggingRules = loggingRules; } else if ("throttlingRules".equals(fieldName)) { List throttlingRules = reader.readArray(reader1 -> ThrottlingRule.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withThrottlingRules(throttlingRules); + deserializedResourceTypeRegistrationProperties.throttlingRules = throttlingRules; } else if ("requiredFeatures".equals(fieldName)) { List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); - deserializedResourceTypeRegistrationProperties.withRequiredFeatures(requiredFeatures); + deserializedResourceTypeRegistrationProperties.requiredFeatures = requiredFeatures; } else if ("featuresRule".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withFeaturesRule(ResourceTypeRegistrationPropertiesFeaturesRule.fromJson(reader)); + deserializedResourceTypeRegistrationProperties.featuresRule + = ResourceTypeRegistrationPropertiesFeaturesRule.fromJson(reader); } else if ("enableAsyncOperation".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withEnableAsyncOperation(reader.getNullable(JsonReader::getBoolean)); + deserializedResourceTypeRegistrationProperties.enableAsyncOperation + = reader.getNullable(JsonReader::getBoolean); } else if ("provisioningState".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); + deserializedResourceTypeRegistrationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else if ("enableThirdPartyS2S".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withEnableThirdPartyS2S(reader.getNullable(JsonReader::getBoolean)); + deserializedResourceTypeRegistrationProperties.enableThirdPartyS2S + = reader.getNullable(JsonReader::getBoolean); } else if ("subscriptionLifecycleNotificationSpecifications".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties.withSubscriptionLifecycleNotificationSpecifications( - ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications - .fromJson(reader)); + deserializedResourceTypeRegistrationProperties.subscriptionLifecycleNotificationSpecifications + = ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + .fromJson(reader); } else if ("isPureProxy".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withIsPureProxy(reader.getNullable(JsonReader::getBoolean)); + deserializedResourceTypeRegistrationProperties.isPureProxy + = reader.getNullable(JsonReader::getBoolean); } else if ("identityManagement".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withIdentityManagement(ResourceTypeRegistrationPropertiesIdentityManagement.fromJson(reader)); + deserializedResourceTypeRegistrationProperties.identityManagement + = ResourceTypeRegistrationPropertiesIdentityManagement.fromJson(reader); } else if ("checkNameAvailabilitySpecifications".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties.withCheckNameAvailabilitySpecifications( - ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.fromJson(reader)); + deserializedResourceTypeRegistrationProperties.checkNameAvailabilitySpecifications + = ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.fromJson(reader); } else if ("disallowedActionVerbs".equals(fieldName)) { List disallowedActionVerbs = reader.readArray(reader1 -> reader1.getString()); - deserializedResourceTypeRegistrationProperties.withDisallowedActionVerbs(disallowedActionVerbs); + deserializedResourceTypeRegistrationProperties.disallowedActionVerbs = disallowedActionVerbs; } else if ("serviceTreeInfos".equals(fieldName)) { List serviceTreeInfos = reader.readArray(reader1 -> ServiceTreeInfo.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withServiceTreeInfos(serviceTreeInfos); + deserializedResourceTypeRegistrationProperties.serviceTreeInfos = serviceTreeInfos; } else if ("requestHeaderOptions".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties.withRequestHeaderOptions( - ResourceTypeRegistrationPropertiesRequestHeaderOptions.fromJson(reader)); + deserializedResourceTypeRegistrationProperties.requestHeaderOptions + = ResourceTypeRegistrationPropertiesRequestHeaderOptions.fromJson(reader); } else if ("subscriptionStateRules".equals(fieldName)) { List subscriptionStateRules = reader.readArray(reader1 -> SubscriptionStateRule.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withSubscriptionStateRules(subscriptionStateRules); + deserializedResourceTypeRegistrationProperties.subscriptionStateRules = subscriptionStateRules; } else if ("templateDeploymentOptions".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties.withTemplateDeploymentOptions( - ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.fromJson(reader)); + deserializedResourceTypeRegistrationProperties.templateDeploymentOptions + = ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.fromJson(reader); } else if ("extendedLocations".equals(fieldName)) { List extendedLocations = reader.readArray(reader1 -> ExtendedLocationOptions.fromJson(reader1)); - deserializedResourceTypeRegistrationProperties.withExtendedLocations(extendedLocations); + deserializedResourceTypeRegistrationProperties.extendedLocations = extendedLocations; } else if ("resourceMovePolicy".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withResourceMovePolicy(ResourceTypeRegistrationPropertiesResourceMovePolicy.fromJson(reader)); + deserializedResourceTypeRegistrationProperties.resourceMovePolicy + = ResourceTypeRegistrationPropertiesResourceMovePolicy.fromJson(reader); } else if ("resourceDeletionPolicy".equals(fieldName)) { - deserializedResourceTypeRegistrationProperties - .withResourceDeletionPolicy(ResourceDeletionPolicy.fromString(reader.getString())); + deserializedResourceTypeRegistrationProperties.resourceDeletionPolicy + = ResourceDeletionPolicy.fromString(reader.getString()); + } else if ("resourceConcurrencyControlOptions".equals(fieldName)) { + Map resourceConcurrencyControlOptions + = reader.readMap(reader1 -> ResourceConcurrencyControlOption.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.resourceConcurrencyControlOptions + = resourceConcurrencyControlOptions; + } else if ("resourceGraphConfiguration".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceGraphConfiguration + = ResourceTypeRegistrationPropertiesResourceGraphConfiguration.fromJson(reader); + } else if ("management".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.management + = ResourceTypeRegistrationPropertiesManagement.fromJson(reader); + } else if ("openApiConfiguration".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.openApiConfiguration + = OpenApiConfiguration.fromJson(reader); + } else if ("onBehalfOfTokens".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.onBehalfOfTokens + = ResourceTypeOnBehalfOfToken.fromJson(reader); + } else if ("category".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.category + = ResourceTypeCategory.fromString(reader.getString()); + } else if ("resourceValidation".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceValidation + = ResourceValidation.fromString(reader.getString()); + } else if ("disallowedEndUserOperations".equals(fieldName)) { + List disallowedEndUserOperations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationProperties.disallowedEndUserOperations + = disallowedEndUserOperations; + } else if ("metadata".equals(fieldName)) { + Map metadata = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedResourceTypeRegistrationProperties.metadata = metadata; + } else if ("skuLink".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.skuLink = reader.getString(); + } else if ("quotaRule".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.quotaRule = QuotaRule.fromJson(reader); + } else if ("notifications".equals(fieldName)) { + List notifications = reader.readArray(reader1 -> Notification.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.notifications = notifications; + } else if ("linkedNotificationRules".equals(fieldName)) { + List linkedNotificationRules + = reader.readArray(reader1 -> LinkedNotificationRule.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.linkedNotificationRules = linkedNotificationRules; + } else if ("resourceProviderAuthorizationRules".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceProviderAuthorizationRules + = ResourceProviderAuthorizationRules.fromJson(reader); + } else if ("tokenAuthConfiguration".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.tokenAuthConfiguration + = TokenAuthConfiguration.fromJson(reader); + } else if ("templateDeploymentPolicy".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.templateDeploymentPolicy + = ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.fromJson(reader); + } else if ("allowEmptyRoleAssignments".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.allowEmptyRoleAssignments + = reader.getNullable(JsonReader::getBoolean); + } else if ("policyExecutionType".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.policyExecutionType + = PolicyExecutionType.fromString(reader.getString()); + } else if ("availabilityZoneRule".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.availabilityZoneRule + = ResourceTypeRegistrationPropertiesAvailabilityZoneRule.fromJson(reader); + } else if ("dstsConfiguration".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.dstsConfiguration + = ResourceTypeRegistrationPropertiesDstsConfiguration.fromJson(reader); + } else if ("asyncTimeoutRules".equals(fieldName)) { + List asyncTimeoutRules + = reader.readArray(reader1 -> AsyncTimeoutRule.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.asyncTimeoutRules = asyncTimeoutRules; + } else if ("commonApiVersions".equals(fieldName)) { + List commonApiVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationProperties.commonApiVersions = commonApiVersions; + } else if ("apiProfiles".equals(fieldName)) { + List apiProfiles = reader.readArray(reader1 -> ApiProfile.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.apiProfiles = apiProfiles; + } else if ("linkedOperationRules".equals(fieldName)) { + List linkedOperationRules + = reader.readArray(reader1 -> LinkedOperationRule.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.linkedOperationRules = linkedOperationRules; + } else if ("legacyName".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.legacyName = reader.getString(); + } else if ("legacyNames".equals(fieldName)) { + List legacyNames = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationProperties.legacyNames = legacyNames; + } else if ("allowedTemplateDeploymentReferenceActions".equals(fieldName)) { + List allowedTemplateDeploymentReferenceActions + = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationProperties.allowedTemplateDeploymentReferenceActions + = allowedTemplateDeploymentReferenceActions; + } else if ("legacyPolicy".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.legacyPolicy + = ResourceTypeRegistrationPropertiesLegacyPolicy.fromJson(reader); + } else if ("manifestLink".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.manifestLink = reader.getString(); + } else if ("capacityRule".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.capacityRule + = ResourceTypeRegistrationPropertiesCapacityRule.fromJson(reader); + } else if ("marketplaceOptions".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.marketplaceOptions + = ResourceTypeRegistrationPropertiesMarketplaceOptions.fromJson(reader); + } else if ("allowedResourceNames".equals(fieldName)) { + List allowedResourceNames + = reader.readArray(reader1 -> AllowedResourceName.fromJson(reader1)); + deserializedResourceTypeRegistrationProperties.allowedResourceNames = allowedResourceNames; + } else if ("resourceCache".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceCache + = ResourceTypeRegistrationPropertiesResourceCache.fromJson(reader); + } else if ("resourceQueryManagement".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceQueryManagement + = ResourceTypeRegistrationPropertiesResourceQueryManagement.fromJson(reader); + } else if ("supportsTags".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.supportsTags + = reader.getNullable(JsonReader::getBoolean); + } else if ("resourceManagementOptions".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceManagementOptions + = ResourceTypeRegistrationPropertiesResourceManagementOptions.fromJson(reader); + } else if ("groupingTag".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.groupingTag = reader.getString(); + } else if ("addResourceListTargetLocations".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.addResourceListTargetLocations + = reader.getNullable(JsonReader::getBoolean); + } else if ("resourceTypeCommonAttributeManagement".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceTypeCommonAttributeManagement + = ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.fromJson(reader); + } else if ("routingRule".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.routingRule + = ResourceTypeRegistrationPropertiesRoutingRule.fromJson(reader); + } else if ("frontdoorRequestMode".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.frontdoorRequestMode + = FrontdoorRequestMode.fromString(reader.getString()); + } else if ("resourceSubType".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.resourceSubType + = ResourceSubType.fromString(reader.getString()); + } else if ("asyncOperationResourceTypeName".equals(fieldName)) { + deserializedResourceTypeRegistrationProperties.asyncOperationResourceTypeName = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAutoGenerated.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAutoGenerated.java deleted file mode 100644 index ddeeb117094f..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAutoGenerated.java +++ /dev/null @@ -1,1008 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ResourceTypeRegistrationPropertiesAutoGenerated model. - */ -@Fluent -public class ResourceTypeRegistrationPropertiesAutoGenerated - implements JsonSerializable { - /* - * The routingType property. - */ - private RoutingType routingType; - - /* - * The regionality property. - */ - private Regionality regionality; - - /* - * The endpoints property. - */ - private List endpoints; - - /* - * The extensionOptions property. - */ - private ResourceTypeRegistrationPropertiesExtensionOptions extensionOptions; - - /* - * The marketplaceType property. - */ - private MarketplaceType marketplaceType; - - /* - * The swaggerSpecifications property. - */ - private List swaggerSpecifications; - - /* - * The allowedUnauthorizedActions property. - */ - private List allowedUnauthorizedActions; - - /* - * The authorizationActionMappings property. - */ - private List authorizationActionMappings; - - /* - * The linkedAccessChecks property. - */ - private List linkedAccessChecks; - - /* - * The defaultApiVersion property. - */ - private String defaultApiVersion; - - /* - * The loggingRules property. - */ - private List loggingRules; - - /* - * The throttlingRules property. - */ - private List throttlingRules; - - /* - * The requiredFeatures property. - */ - private List requiredFeatures; - - /* - * The featuresRule property. - */ - private ResourceTypeRegistrationPropertiesFeaturesRule featuresRule; - - /* - * The enableAsyncOperation property. - */ - private Boolean enableAsyncOperation; - - /* - * The provisioningState property. - */ - private ProvisioningState provisioningState; - - /* - * The enableThirdPartyS2S property. - */ - private Boolean enableThirdPartyS2S; - - /* - * The subscriptionLifecycleNotificationSpecifications property. - */ - private ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications; - - /* - * The isPureProxy property. - */ - private Boolean isPureProxy; - - /* - * The identityManagement property. - */ - private ResourceTypeRegistrationPropertiesIdentityManagement identityManagement; - - /* - * The checkNameAvailabilitySpecifications property. - */ - private ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications; - - /* - * The disallowedActionVerbs property. - */ - private List disallowedActionVerbs; - - /* - * The serviceTreeInfos property. - */ - private List serviceTreeInfos; - - /* - * The requestHeaderOptions property. - */ - private ResourceTypeRegistrationPropertiesRequestHeaderOptions requestHeaderOptions; - - /* - * The subscriptionStateRules property. - */ - private List subscriptionStateRules; - - /* - * The templateDeploymentOptions property. - */ - private ResourceTypeRegistrationPropertiesTemplateDeploymentOptions templateDeploymentOptions; - - /* - * The extendedLocations property. - */ - private List extendedLocations; - - /* - * The resourceMovePolicy property. - */ - private ResourceTypeRegistrationPropertiesResourceMovePolicy resourceMovePolicy; - - /* - * The resourceDeletionPolicy property. - */ - private ResourceDeletionPolicy resourceDeletionPolicy; - - /** - * Creates an instance of ResourceTypeRegistrationPropertiesAutoGenerated class. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated() { - } - - /** - * Get the routingType property: The routingType property. - * - * @return the routingType value. - */ - public RoutingType routingType() { - return this.routingType; - } - - /** - * Set the routingType property: The routingType property. - * - * @param routingType the routingType value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withRoutingType(RoutingType routingType) { - this.routingType = routingType; - return this; - } - - /** - * Get the regionality property: The regionality property. - * - * @return the regionality value. - */ - public Regionality regionality() { - return this.regionality; - } - - /** - * Set the regionality property: The regionality property. - * - * @param regionality the regionality value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withRegionality(Regionality regionality) { - this.regionality = regionality; - return this; - } - - /** - * Get the endpoints property: The endpoints property. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Set the endpoints property: The endpoints property. - * - * @param endpoints the endpoints value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Get the extensionOptions property: The extensionOptions property. - * - * @return the extensionOptions value. - */ - public ResourceTypeRegistrationPropertiesExtensionOptions extensionOptions() { - return this.extensionOptions; - } - - /** - * Set the extensionOptions property: The extensionOptions property. - * - * @param extensionOptions the extensionOptions value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withExtensionOptions(ResourceTypeRegistrationPropertiesExtensionOptions extensionOptions) { - this.extensionOptions = extensionOptions; - return this; - } - - /** - * Get the marketplaceType property: The marketplaceType property. - * - * @return the marketplaceType value. - */ - public MarketplaceType marketplaceType() { - return this.marketplaceType; - } - - /** - * Set the marketplaceType property: The marketplaceType property. - * - * @param marketplaceType the marketplaceType value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withMarketplaceType(MarketplaceType marketplaceType) { - this.marketplaceType = marketplaceType; - return this; - } - - /** - * Get the swaggerSpecifications property: The swaggerSpecifications property. - * - * @return the swaggerSpecifications value. - */ - public List swaggerSpecifications() { - return this.swaggerSpecifications; - } - - /** - * Set the swaggerSpecifications property: The swaggerSpecifications property. - * - * @param swaggerSpecifications the swaggerSpecifications value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withSwaggerSpecifications(List swaggerSpecifications) { - this.swaggerSpecifications = swaggerSpecifications; - return this; - } - - /** - * Get the allowedUnauthorizedActions property: The allowedUnauthorizedActions property. - * - * @return the allowedUnauthorizedActions value. - */ - public List allowedUnauthorizedActions() { - return this.allowedUnauthorizedActions; - } - - /** - * Set the allowedUnauthorizedActions property: The allowedUnauthorizedActions property. - * - * @param allowedUnauthorizedActions the allowedUnauthorizedActions value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withAllowedUnauthorizedActions(List allowedUnauthorizedActions) { - this.allowedUnauthorizedActions = allowedUnauthorizedActions; - return this; - } - - /** - * Get the authorizationActionMappings property: The authorizationActionMappings property. - * - * @return the authorizationActionMappings value. - */ - public List authorizationActionMappings() { - return this.authorizationActionMappings; - } - - /** - * Set the authorizationActionMappings property: The authorizationActionMappings property. - * - * @param authorizationActionMappings the authorizationActionMappings value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withAuthorizationActionMappings(List authorizationActionMappings) { - this.authorizationActionMappings = authorizationActionMappings; - return this; - } - - /** - * Get the linkedAccessChecks property: The linkedAccessChecks property. - * - * @return the linkedAccessChecks value. - */ - public List linkedAccessChecks() { - return this.linkedAccessChecks; - } - - /** - * Set the linkedAccessChecks property: The linkedAccessChecks property. - * - * @param linkedAccessChecks the linkedAccessChecks value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withLinkedAccessChecks(List linkedAccessChecks) { - this.linkedAccessChecks = linkedAccessChecks; - return this; - } - - /** - * Get the defaultApiVersion property: The defaultApiVersion property. - * - * @return the defaultApiVersion value. - */ - public String defaultApiVersion() { - return this.defaultApiVersion; - } - - /** - * Set the defaultApiVersion property: The defaultApiVersion property. - * - * @param defaultApiVersion the defaultApiVersion value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withDefaultApiVersion(String defaultApiVersion) { - this.defaultApiVersion = defaultApiVersion; - return this; - } - - /** - * Get the loggingRules property: The loggingRules property. - * - * @return the loggingRules value. - */ - public List loggingRules() { - return this.loggingRules; - } - - /** - * Set the loggingRules property: The loggingRules property. - * - * @param loggingRules the loggingRules value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withLoggingRules(List loggingRules) { - this.loggingRules = loggingRules; - return this; - } - - /** - * Get the throttlingRules property: The throttlingRules property. - * - * @return the throttlingRules value. - */ - public List throttlingRules() { - return this.throttlingRules; - } - - /** - * Set the throttlingRules property: The throttlingRules property. - * - * @param throttlingRules the throttlingRules value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withThrottlingRules(List throttlingRules) { - this.throttlingRules = throttlingRules; - return this; - } - - /** - * Get the requiredFeatures property: The requiredFeatures property. - * - * @return the requiredFeatures value. - */ - public List requiredFeatures() { - return this.requiredFeatures; - } - - /** - * Set the requiredFeatures property: The requiredFeatures property. - * - * @param requiredFeatures the requiredFeatures value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withRequiredFeatures(List requiredFeatures) { - this.requiredFeatures = requiredFeatures; - return this; - } - - /** - * Get the featuresRule property: The featuresRule property. - * - * @return the featuresRule value. - */ - public ResourceTypeRegistrationPropertiesFeaturesRule featuresRule() { - return this.featuresRule; - } - - /** - * Set the featuresRule property: The featuresRule property. - * - * @param featuresRule the featuresRule value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withFeaturesRule(ResourceTypeRegistrationPropertiesFeaturesRule featuresRule) { - this.featuresRule = featuresRule; - return this; - } - - /** - * Get the enableAsyncOperation property: The enableAsyncOperation property. - * - * @return the enableAsyncOperation value. - */ - public Boolean enableAsyncOperation() { - return this.enableAsyncOperation; - } - - /** - * Set the enableAsyncOperation property: The enableAsyncOperation property. - * - * @param enableAsyncOperation the enableAsyncOperation value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withEnableAsyncOperation(Boolean enableAsyncOperation) { - this.enableAsyncOperation = enableAsyncOperation; - return this; - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The provisioningState property. - * - * @param provisioningState the provisioningState value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the enableThirdPartyS2S property: The enableThirdPartyS2S property. - * - * @return the enableThirdPartyS2S value. - */ - public Boolean enableThirdPartyS2S() { - return this.enableThirdPartyS2S; - } - - /** - * Set the enableThirdPartyS2S property: The enableThirdPartyS2S property. - * - * @param enableThirdPartyS2S the enableThirdPartyS2S value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withEnableThirdPartyS2S(Boolean enableThirdPartyS2S) { - this.enableThirdPartyS2S = enableThirdPartyS2S; - return this; - } - - /** - * Get the subscriptionLifecycleNotificationSpecifications property: The - * subscriptionLifecycleNotificationSpecifications property. - * - * @return the subscriptionLifecycleNotificationSpecifications value. - */ - public ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications - subscriptionLifecycleNotificationSpecifications() { - return this.subscriptionLifecycleNotificationSpecifications; - } - - /** - * Set the subscriptionLifecycleNotificationSpecifications property: The - * subscriptionLifecycleNotificationSpecifications property. - * - * @param subscriptionLifecycleNotificationSpecifications the subscriptionLifecycleNotificationSpecifications value - * to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withSubscriptionLifecycleNotificationSpecifications( - ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications subscriptionLifecycleNotificationSpecifications) { - this.subscriptionLifecycleNotificationSpecifications = subscriptionLifecycleNotificationSpecifications; - return this; - } - - /** - * Get the isPureProxy property: The isPureProxy property. - * - * @return the isPureProxy value. - */ - public Boolean isPureProxy() { - return this.isPureProxy; - } - - /** - * Set the isPureProxy property: The isPureProxy property. - * - * @param isPureProxy the isPureProxy value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withIsPureProxy(Boolean isPureProxy) { - this.isPureProxy = isPureProxy; - return this; - } - - /** - * Get the identityManagement property: The identityManagement property. - * - * @return the identityManagement value. - */ - public ResourceTypeRegistrationPropertiesIdentityManagement identityManagement() { - return this.identityManagement; - } - - /** - * Set the identityManagement property: The identityManagement property. - * - * @param identityManagement the identityManagement value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withIdentityManagement(ResourceTypeRegistrationPropertiesIdentityManagement identityManagement) { - this.identityManagement = identityManagement; - return this; - } - - /** - * Get the checkNameAvailabilitySpecifications property: The checkNameAvailabilitySpecifications property. - * - * @return the checkNameAvailabilitySpecifications value. - */ - public ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications() { - return this.checkNameAvailabilitySpecifications; - } - - /** - * Set the checkNameAvailabilitySpecifications property: The checkNameAvailabilitySpecifications property. - * - * @param checkNameAvailabilitySpecifications the checkNameAvailabilitySpecifications value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withCheckNameAvailabilitySpecifications( - ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications checkNameAvailabilitySpecifications) { - this.checkNameAvailabilitySpecifications = checkNameAvailabilitySpecifications; - return this; - } - - /** - * Get the disallowedActionVerbs property: The disallowedActionVerbs property. - * - * @return the disallowedActionVerbs value. - */ - public List disallowedActionVerbs() { - return this.disallowedActionVerbs; - } - - /** - * Set the disallowedActionVerbs property: The disallowedActionVerbs property. - * - * @param disallowedActionVerbs the disallowedActionVerbs value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withDisallowedActionVerbs(List disallowedActionVerbs) { - this.disallowedActionVerbs = disallowedActionVerbs; - return this; - } - - /** - * Get the serviceTreeInfos property: The serviceTreeInfos property. - * - * @return the serviceTreeInfos value. - */ - public List serviceTreeInfos() { - return this.serviceTreeInfos; - } - - /** - * Set the serviceTreeInfos property: The serviceTreeInfos property. - * - * @param serviceTreeInfos the serviceTreeInfos value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withServiceTreeInfos(List serviceTreeInfos) { - this.serviceTreeInfos = serviceTreeInfos; - return this; - } - - /** - * Get the requestHeaderOptions property: The requestHeaderOptions property. - * - * @return the requestHeaderOptions value. - */ - public ResourceTypeRegistrationPropertiesRequestHeaderOptions requestHeaderOptions() { - return this.requestHeaderOptions; - } - - /** - * Set the requestHeaderOptions property: The requestHeaderOptions property. - * - * @param requestHeaderOptions the requestHeaderOptions value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withRequestHeaderOptions(ResourceTypeRegistrationPropertiesRequestHeaderOptions requestHeaderOptions) { - this.requestHeaderOptions = requestHeaderOptions; - return this; - } - - /** - * Get the subscriptionStateRules property: The subscriptionStateRules property. - * - * @return the subscriptionStateRules value. - */ - public List subscriptionStateRules() { - return this.subscriptionStateRules; - } - - /** - * Set the subscriptionStateRules property: The subscriptionStateRules property. - * - * @param subscriptionStateRules the subscriptionStateRules value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withSubscriptionStateRules(List subscriptionStateRules) { - this.subscriptionStateRules = subscriptionStateRules; - return this; - } - - /** - * Get the templateDeploymentOptions property: The templateDeploymentOptions property. - * - * @return the templateDeploymentOptions value. - */ - public ResourceTypeRegistrationPropertiesTemplateDeploymentOptions templateDeploymentOptions() { - return this.templateDeploymentOptions; - } - - /** - * Set the templateDeploymentOptions property: The templateDeploymentOptions property. - * - * @param templateDeploymentOptions the templateDeploymentOptions value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated withTemplateDeploymentOptions( - ResourceTypeRegistrationPropertiesTemplateDeploymentOptions templateDeploymentOptions) { - this.templateDeploymentOptions = templateDeploymentOptions; - return this; - } - - /** - * Get the extendedLocations property: The extendedLocations property. - * - * @return the extendedLocations value. - */ - public List extendedLocations() { - return this.extendedLocations; - } - - /** - * Set the extendedLocations property: The extendedLocations property. - * - * @param extendedLocations the extendedLocations value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withExtendedLocations(List extendedLocations) { - this.extendedLocations = extendedLocations; - return this; - } - - /** - * Get the resourceMovePolicy property: The resourceMovePolicy property. - * - * @return the resourceMovePolicy value. - */ - public ResourceTypeRegistrationPropertiesResourceMovePolicy resourceMovePolicy() { - return this.resourceMovePolicy; - } - - /** - * Set the resourceMovePolicy property: The resourceMovePolicy property. - * - * @param resourceMovePolicy the resourceMovePolicy value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withResourceMovePolicy(ResourceTypeRegistrationPropertiesResourceMovePolicy resourceMovePolicy) { - this.resourceMovePolicy = resourceMovePolicy; - return this; - } - - /** - * Get the resourceDeletionPolicy property: The resourceDeletionPolicy property. - * - * @return the resourceDeletionPolicy value. - */ - public ResourceDeletionPolicy resourceDeletionPolicy() { - return this.resourceDeletionPolicy; - } - - /** - * Set the resourceDeletionPolicy property: The resourceDeletionPolicy property. - * - * @param resourceDeletionPolicy the resourceDeletionPolicy value to set. - * @return the ResourceTypeRegistrationPropertiesAutoGenerated object itself. - */ - public ResourceTypeRegistrationPropertiesAutoGenerated - withResourceDeletionPolicy(ResourceDeletionPolicy resourceDeletionPolicy) { - this.resourceDeletionPolicy = resourceDeletionPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - if (extensionOptions() != null) { - extensionOptions().validate(); - } - if (swaggerSpecifications() != null) { - swaggerSpecifications().forEach(e -> e.validate()); - } - if (authorizationActionMappings() != null) { - authorizationActionMappings().forEach(e -> e.validate()); - } - if (linkedAccessChecks() != null) { - linkedAccessChecks().forEach(e -> e.validate()); - } - if (loggingRules() != null) { - loggingRules().forEach(e -> e.validate()); - } - if (throttlingRules() != null) { - throttlingRules().forEach(e -> e.validate()); - } - if (featuresRule() != null) { - featuresRule().validate(); - } - if (subscriptionLifecycleNotificationSpecifications() != null) { - subscriptionLifecycleNotificationSpecifications().validate(); - } - if (identityManagement() != null) { - identityManagement().validate(); - } - if (checkNameAvailabilitySpecifications() != null) { - checkNameAvailabilitySpecifications().validate(); - } - if (serviceTreeInfos() != null) { - serviceTreeInfos().forEach(e -> e.validate()); - } - if (requestHeaderOptions() != null) { - requestHeaderOptions().validate(); - } - if (subscriptionStateRules() != null) { - subscriptionStateRules().forEach(e -> e.validate()); - } - if (templateDeploymentOptions() != null) { - templateDeploymentOptions().validate(); - } - if (extendedLocations() != null) { - extendedLocations().forEach(e -> e.validate()); - } - if (resourceMovePolicy() != null) { - resourceMovePolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("routingType", this.routingType == null ? null : this.routingType.toString()); - jsonWriter.writeStringField("regionality", this.regionality == null ? null : this.regionality.toString()); - jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("extensionOptions", this.extensionOptions); - jsonWriter.writeStringField("marketplaceType", - this.marketplaceType == null ? null : this.marketplaceType.toString()); - jsonWriter.writeArrayField("swaggerSpecifications", this.swaggerSpecifications, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("allowedUnauthorizedActions", this.allowedUnauthorizedActions, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("authorizationActionMappings", this.authorizationActionMappings, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("linkedAccessChecks", this.linkedAccessChecks, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("defaultApiVersion", this.defaultApiVersion); - jsonWriter.writeArrayField("loggingRules", this.loggingRules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("throttlingRules", this.throttlingRules, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("featuresRule", this.featuresRule); - jsonWriter.writeBooleanField("enableAsyncOperation", this.enableAsyncOperation); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); - jsonWriter.writeBooleanField("enableThirdPartyS2S", this.enableThirdPartyS2S); - jsonWriter.writeJsonField("subscriptionLifecycleNotificationSpecifications", - this.subscriptionLifecycleNotificationSpecifications); - jsonWriter.writeBooleanField("isPureProxy", this.isPureProxy); - jsonWriter.writeJsonField("identityManagement", this.identityManagement); - jsonWriter.writeJsonField("checkNameAvailabilitySpecifications", this.checkNameAvailabilitySpecifications); - jsonWriter.writeArrayField("disallowedActionVerbs", this.disallowedActionVerbs, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("serviceTreeInfos", this.serviceTreeInfos, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("requestHeaderOptions", this.requestHeaderOptions); - jsonWriter.writeArrayField("subscriptionStateRules", this.subscriptionStateRules, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("templateDeploymentOptions", this.templateDeploymentOptions); - jsonWriter.writeArrayField("extendedLocations", this.extendedLocations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resourceMovePolicy", this.resourceMovePolicy); - jsonWriter.writeStringField("resourceDeletionPolicy", - this.resourceDeletionPolicy == null ? null : this.resourceDeletionPolicy.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ResourceTypeRegistrationPropertiesAutoGenerated from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ResourceTypeRegistrationPropertiesAutoGenerated 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 ResourceTypeRegistrationPropertiesAutoGenerated. - */ - public static ResourceTypeRegistrationPropertiesAutoGenerated fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ResourceTypeRegistrationPropertiesAutoGenerated deserializedResourceTypeRegistrationPropertiesAutoGenerated - = new ResourceTypeRegistrationPropertiesAutoGenerated(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("routingType".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.routingType - = RoutingType.fromString(reader.getString()); - } else if ("regionality".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.regionality - = Regionality.fromString(reader.getString()); - } else if ("endpoints".equals(fieldName)) { - List endpoints - = reader.readArray(reader1 -> ResourceTypeEndpoint.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.endpoints = endpoints; - } else if ("extensionOptions".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.extensionOptions - = ResourceTypeRegistrationPropertiesExtensionOptions.fromJson(reader); - } else if ("marketplaceType".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.marketplaceType - = MarketplaceType.fromString(reader.getString()); - } else if ("swaggerSpecifications".equals(fieldName)) { - List swaggerSpecifications - = reader.readArray(reader1 -> SwaggerSpecification.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.swaggerSpecifications - = swaggerSpecifications; - } else if ("allowedUnauthorizedActions".equals(fieldName)) { - List allowedUnauthorizedActions = reader.readArray(reader1 -> reader1.getString()); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.allowedUnauthorizedActions - = allowedUnauthorizedActions; - } else if ("authorizationActionMappings".equals(fieldName)) { - List authorizationActionMappings - = reader.readArray(reader1 -> AuthorizationActionMapping.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.authorizationActionMappings - = authorizationActionMappings; - } else if ("linkedAccessChecks".equals(fieldName)) { - List linkedAccessChecks - = reader.readArray(reader1 -> LinkedAccessCheck.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.linkedAccessChecks = linkedAccessChecks; - } else if ("defaultApiVersion".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.defaultApiVersion = reader.getString(); - } else if ("loggingRules".equals(fieldName)) { - List loggingRules = reader.readArray(reader1 -> LoggingRule.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.loggingRules = loggingRules; - } else if ("throttlingRules".equals(fieldName)) { - List throttlingRules - = reader.readArray(reader1 -> ThrottlingRule.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.throttlingRules = throttlingRules; - } else if ("requiredFeatures".equals(fieldName)) { - List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.requiredFeatures = requiredFeatures; - } else if ("featuresRule".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.featuresRule - = ResourceTypeRegistrationPropertiesFeaturesRule.fromJson(reader); - } else if ("enableAsyncOperation".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.enableAsyncOperation - = reader.getNullable(JsonReader::getBoolean); - } else if ("provisioningState".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.provisioningState - = ProvisioningState.fromString(reader.getString()); - } else if ("enableThirdPartyS2S".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.enableThirdPartyS2S - = reader.getNullable(JsonReader::getBoolean); - } else if ("subscriptionLifecycleNotificationSpecifications".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.subscriptionLifecycleNotificationSpecifications - = ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications - .fromJson(reader); - } else if ("isPureProxy".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.isPureProxy - = reader.getNullable(JsonReader::getBoolean); - } else if ("identityManagement".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.identityManagement - = ResourceTypeRegistrationPropertiesIdentityManagement.fromJson(reader); - } else if ("checkNameAvailabilitySpecifications".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.checkNameAvailabilitySpecifications - = ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.fromJson(reader); - } else if ("disallowedActionVerbs".equals(fieldName)) { - List disallowedActionVerbs = reader.readArray(reader1 -> reader1.getString()); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.disallowedActionVerbs - = disallowedActionVerbs; - } else if ("serviceTreeInfos".equals(fieldName)) { - List serviceTreeInfos - = reader.readArray(reader1 -> ServiceTreeInfo.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.serviceTreeInfos = serviceTreeInfos; - } else if ("requestHeaderOptions".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.requestHeaderOptions - = ResourceTypeRegistrationPropertiesRequestHeaderOptions.fromJson(reader); - } else if ("subscriptionStateRules".equals(fieldName)) { - List subscriptionStateRules - = reader.readArray(reader1 -> SubscriptionStateRule.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.subscriptionStateRules - = subscriptionStateRules; - } else if ("templateDeploymentOptions".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.templateDeploymentOptions - = ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.fromJson(reader); - } else if ("extendedLocations".equals(fieldName)) { - List extendedLocations - = reader.readArray(reader1 -> ExtendedLocationOptions.fromJson(reader1)); - deserializedResourceTypeRegistrationPropertiesAutoGenerated.extendedLocations = extendedLocations; - } else if ("resourceMovePolicy".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.resourceMovePolicy - = ResourceTypeRegistrationPropertiesResourceMovePolicy.fromJson(reader); - } else if ("resourceDeletionPolicy".equals(fieldName)) { - deserializedResourceTypeRegistrationPropertiesAutoGenerated.resourceDeletionPolicy - = ResourceDeletionPolicy.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedResourceTypeRegistrationPropertiesAutoGenerated; - }); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAvailabilityZoneRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAvailabilityZoneRule.java new file mode 100644 index 000000000000..f36061e8ce3f --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesAvailabilityZoneRule.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The availability zone rule. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesAvailabilityZoneRule + implements JsonSerializable { + /* + * The availabilityZonePolicy property. + */ + private AvailabilityZonePolicy availabilityZonePolicy; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesAvailabilityZoneRule class. + */ + public ResourceTypeRegistrationPropertiesAvailabilityZoneRule() { + } + + /** + * Get the availabilityZonePolicy property: The availabilityZonePolicy property. + * + * @return the availabilityZonePolicy value. + */ + public AvailabilityZonePolicy availabilityZonePolicy() { + return this.availabilityZonePolicy; + } + + /** + * Set the availabilityZonePolicy property: The availabilityZonePolicy property. + * + * @param availabilityZonePolicy the availabilityZonePolicy value to set. + * @return the ResourceTypeRegistrationPropertiesAvailabilityZoneRule object itself. + */ + public ResourceTypeRegistrationPropertiesAvailabilityZoneRule + withAvailabilityZonePolicy(AvailabilityZonePolicy availabilityZonePolicy) { + this.availabilityZonePolicy = availabilityZonePolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("availabilityZonePolicy", + this.availabilityZonePolicy == null ? null : this.availabilityZonePolicy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesAvailabilityZoneRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesAvailabilityZoneRule 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 ResourceTypeRegistrationPropertiesAvailabilityZoneRule. + */ + public static ResourceTypeRegistrationPropertiesAvailabilityZoneRule fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesAvailabilityZoneRule deserializedResourceTypeRegistrationPropertiesAvailabilityZoneRule + = new ResourceTypeRegistrationPropertiesAvailabilityZoneRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("availabilityZonePolicy".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesAvailabilityZoneRule.availabilityZonePolicy + = AvailabilityZonePolicy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesAvailabilityZoneRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCapacityRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCapacityRule.java new file mode 100644 index 000000000000..e8916b655cce --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCapacityRule.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Capacity rule. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesCapacityRule + implements JsonSerializable { + /* + * Capacity policy. + */ + private CapacityPolicy capacityPolicy; + + /* + * Sku alias + */ + private String skuAlias; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesCapacityRule class. + */ + public ResourceTypeRegistrationPropertiesCapacityRule() { + } + + /** + * Get the capacityPolicy property: Capacity policy. + * + * @return the capacityPolicy value. + */ + public CapacityPolicy capacityPolicy() { + return this.capacityPolicy; + } + + /** + * Set the capacityPolicy property: Capacity policy. + * + * @param capacityPolicy the capacityPolicy value to set. + * @return the ResourceTypeRegistrationPropertiesCapacityRule object itself. + */ + public ResourceTypeRegistrationPropertiesCapacityRule withCapacityPolicy(CapacityPolicy capacityPolicy) { + this.capacityPolicy = capacityPolicy; + return this; + } + + /** + * Get the skuAlias property: Sku alias. + * + * @return the skuAlias value. + */ + public String skuAlias() { + return this.skuAlias; + } + + /** + * Set the skuAlias property: Sku alias. + * + * @param skuAlias the skuAlias value to set. + * @return the ResourceTypeRegistrationPropertiesCapacityRule object itself. + */ + public ResourceTypeRegistrationPropertiesCapacityRule withSkuAlias(String skuAlias) { + this.skuAlias = skuAlias; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("capacityPolicy", + this.capacityPolicy == null ? null : this.capacityPolicy.toString()); + jsonWriter.writeStringField("skuAlias", this.skuAlias); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesCapacityRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesCapacityRule 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 ResourceTypeRegistrationPropertiesCapacityRule. + */ + public static ResourceTypeRegistrationPropertiesCapacityRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesCapacityRule deserializedResourceTypeRegistrationPropertiesCapacityRule + = new ResourceTypeRegistrationPropertiesCapacityRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacityPolicy".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesCapacityRule.capacityPolicy + = CapacityPolicy.fromString(reader.getString()); + } else if ("skuAlias".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesCapacityRule.skuAlias = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesCapacityRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.java index 4753f7408f72..9c2841535310 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications model. + * The check name availability specifications. */ @Fluent public final class ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesDstsConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesDstsConfiguration.java new file mode 100644 index 000000000000..d1c6f00c8795 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesDstsConfiguration.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The dsts configuration. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesDstsConfiguration extends DstsConfiguration { + /** + * Creates an instance of ResourceTypeRegistrationPropertiesDstsConfiguration class. + */ + public ResourceTypeRegistrationPropertiesDstsConfiguration() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesDstsConfiguration withServiceName(String serviceName) { + super.withServiceName(serviceName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesDstsConfiguration withServiceDnsName(String serviceDnsName) { + super.withServiceDnsName(serviceDnsName); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (serviceName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceName in model ResourceTypeRegistrationPropertiesDstsConfiguration")); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(ResourceTypeRegistrationPropertiesDstsConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceName", serviceName()); + jsonWriter.writeStringField("serviceDnsName", serviceDnsName()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesDstsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesDstsConfiguration 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 ResourceTypeRegistrationPropertiesDstsConfiguration. + */ + public static ResourceTypeRegistrationPropertiesDstsConfiguration fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesDstsConfiguration deserializedResourceTypeRegistrationPropertiesDstsConfiguration + = new ResourceTypeRegistrationPropertiesDstsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceName".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesDstsConfiguration.withServiceName(reader.getString()); + } else if ("serviceDnsName".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesDstsConfiguration + .withServiceDnsName(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesDstsConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesExtensionOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesExtensionOptions.java index e846cda3255c..96eaaac0df03 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesExtensionOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesExtensionOptions.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceTypeRegistrationPropertiesExtensionOptions model. + * The extension options. */ @Fluent public final class ResourceTypeRegistrationPropertiesExtensionOptions extends ResourceTypeExtensionOptions { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesFeaturesRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesFeaturesRule.java index 23e2734b37a3..85515c4b908a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesFeaturesRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesFeaturesRule.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ResourceTypeRegistrationPropertiesFeaturesRule model. + * The features rule. */ @Fluent public final class ResourceTypeRegistrationPropertiesFeaturesRule extends FeaturesRule { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesIdentityManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesIdentityManagement.java index e2e48190b976..2d3892ac37d3 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesIdentityManagement.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesIdentityManagement.java @@ -9,9 +9,10 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** - * The ResourceTypeRegistrationPropertiesIdentityManagement model. + * The identity management. */ @Fluent public final class ResourceTypeRegistrationPropertiesIdentityManagement extends IdentityManagementProperties { @@ -39,6 +40,24 @@ public ResourceTypeRegistrationPropertiesIdentityManagement withApplicationId(St return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesIdentityManagement withApplicationIds(List applicationIds) { + super.withApplicationIds(applicationIds); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesIdentityManagement withDelegationAppIds(List delegationAppIds) { + super.withDelegationAppIds(delegationAppIds); + return this; + } + /** * Validates the instance. * @@ -56,6 +75,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("type", type() == null ? null : type().toString()); jsonWriter.writeStringField("applicationId", applicationId()); + jsonWriter.writeArrayField("applicationIds", applicationIds(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("delegationAppIds", delegationAppIds(), + (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -82,6 +105,13 @@ public static ResourceTypeRegistrationPropertiesIdentityManagement fromJson(Json } else if ("applicationId".equals(fieldName)) { deserializedResourceTypeRegistrationPropertiesIdentityManagement .withApplicationId(reader.getString()); + } else if ("applicationIds".equals(fieldName)) { + List applicationIds = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationPropertiesIdentityManagement.withApplicationIds(applicationIds); + } else if ("delegationAppIds".equals(fieldName)) { + List delegationAppIds = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationPropertiesIdentityManagement + .withDelegationAppIds(delegationAppIds); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesLegacyPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesLegacyPolicy.java new file mode 100644 index 000000000000..fd1194be2cb3 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesLegacyPolicy.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The legacy policy. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesLegacyPolicy + implements JsonSerializable { + /* + * The disallowedLegacyOperations property. + */ + private List disallowedLegacyOperations; + + /* + * The disallowedConditions property. + */ + private List disallowedConditions; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesLegacyPolicy class. + */ + public ResourceTypeRegistrationPropertiesLegacyPolicy() { + } + + /** + * Get the disallowedLegacyOperations property: The disallowedLegacyOperations property. + * + * @return the disallowedLegacyOperations value. + */ + public List disallowedLegacyOperations() { + return this.disallowedLegacyOperations; + } + + /** + * Set the disallowedLegacyOperations property: The disallowedLegacyOperations property. + * + * @param disallowedLegacyOperations the disallowedLegacyOperations value to set. + * @return the ResourceTypeRegistrationPropertiesLegacyPolicy object itself. + */ + public ResourceTypeRegistrationPropertiesLegacyPolicy + withDisallowedLegacyOperations(List disallowedLegacyOperations) { + this.disallowedLegacyOperations = disallowedLegacyOperations; + return this; + } + + /** + * Get the disallowedConditions property: The disallowedConditions property. + * + * @return the disallowedConditions value. + */ + public List disallowedConditions() { + return this.disallowedConditions; + } + + /** + * Set the disallowedConditions property: The disallowedConditions property. + * + * @param disallowedConditions the disallowedConditions value to set. + * @return the ResourceTypeRegistrationPropertiesLegacyPolicy object itself. + */ + public ResourceTypeRegistrationPropertiesLegacyPolicy + withDisallowedConditions(List disallowedConditions) { + this.disallowedConditions = disallowedConditions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (disallowedConditions() != null) { + disallowedConditions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("disallowedLegacyOperations", this.disallowedLegacyOperations, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("disallowedConditions", this.disallowedConditions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesLegacyPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesLegacyPolicy 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 ResourceTypeRegistrationPropertiesLegacyPolicy. + */ + public static ResourceTypeRegistrationPropertiesLegacyPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesLegacyPolicy deserializedResourceTypeRegistrationPropertiesLegacyPolicy + = new ResourceTypeRegistrationPropertiesLegacyPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disallowedLegacyOperations".equals(fieldName)) { + List disallowedLegacyOperations + = reader.readArray(reader1 -> LegacyOperation.fromString(reader1.getString())); + deserializedResourceTypeRegistrationPropertiesLegacyPolicy.disallowedLegacyOperations + = disallowedLegacyOperations; + } else if ("disallowedConditions".equals(fieldName)) { + List disallowedConditions + = reader.readArray(reader1 -> LegacyDisallowedCondition.fromJson(reader1)); + deserializedResourceTypeRegistrationPropertiesLegacyPolicy.disallowedConditions + = disallowedConditions; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesLegacyPolicy; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesManagement.java new file mode 100644 index 000000000000..73f283d20276 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesManagement.java @@ -0,0 +1,291 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The resource provider management. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesManagement extends ResourceProviderManagement { + /** + * Creates an instance of ResourceTypeRegistrationPropertiesManagement class. + */ + public ResourceTypeRegistrationPropertiesManagement() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withSchemaOwners(List schemaOwners) { + super.withSchemaOwners(schemaOwners); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withManifestOwners(List manifestOwners) { + super.withManifestOwners(manifestOwners); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withAuthorizationOwners(List authorizationOwners) { + super.withAuthorizationOwners(authorizationOwners); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withIncidentRoutingService(String incidentRoutingService) { + super.withIncidentRoutingService(incidentRoutingService); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withIncidentRoutingTeam(String incidentRoutingTeam) { + super.withIncidentRoutingTeam(incidentRoutingTeam); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withIncidentContactEmail(String incidentContactEmail) { + super.withIncidentContactEmail(incidentContactEmail); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withServiceTreeInfos(List serviceTreeInfos) { + super.withServiceTreeInfos(serviceTreeInfos); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement + withResourceAccessPolicy(ResourceAccessPolicy resourceAccessPolicy) { + super.withResourceAccessPolicy(resourceAccessPolicy); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement + withResourceAccessRoles(List resourceAccessRoles) { + super.withResourceAccessRoles(resourceAccessRoles); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement + withExpeditedRolloutSubmitters(List expeditedRolloutSubmitters) { + super.withExpeditedRolloutSubmitters(expeditedRolloutSubmitters); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withErrorResponseMessageOptions( + ResourceProviderManagementErrorResponseMessageOptions errorResponseMessageOptions) { + super.withErrorResponseMessageOptions(errorResponseMessageOptions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement + withExpeditedRolloutMetadata(ResourceProviderManagementExpeditedRolloutMetadata expeditedRolloutMetadata) { + super.withExpeditedRolloutMetadata(expeditedRolloutMetadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withCanaryManifestOwners(List canaryManifestOwners) { + super.withCanaryManifestOwners(canaryManifestOwners); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withPcCode(String pcCode) { + super.withPcCode(pcCode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesManagement withProfitCenterProgramId(String profitCenterProgramId) { + super.withProfitCenterProgramId(profitCenterProgramId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (serviceTreeInfos() != null) { + serviceTreeInfos().forEach(e -> e.validate()); + } + if (resourceAccessRoles() != null) { + resourceAccessRoles().forEach(e -> e.validate()); + } + if (errorResponseMessageOptions() != null) { + errorResponseMessageOptions().validate(); + } + if (expeditedRolloutMetadata() != null) { + expeditedRolloutMetadata().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("schemaOwners", schemaOwners(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("manifestOwners", manifestOwners(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("authorizationOwners", authorizationOwners(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("incidentRoutingService", incidentRoutingService()); + jsonWriter.writeStringField("incidentRoutingTeam", incidentRoutingTeam()); + jsonWriter.writeStringField("incidentContactEmail", incidentContactEmail()); + jsonWriter.writeArrayField("serviceTreeInfos", serviceTreeInfos(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("resourceAccessPolicy", + resourceAccessPolicy() == null ? null : resourceAccessPolicy().toString()); + jsonWriter.writeArrayField("resourceAccessRoles", resourceAccessRoles(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("expeditedRolloutSubmitters", expeditedRolloutSubmitters(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("errorResponseMessageOptions", errorResponseMessageOptions()); + jsonWriter.writeJsonField("expeditedRolloutMetadata", expeditedRolloutMetadata()); + jsonWriter.writeArrayField("canaryManifestOwners", canaryManifestOwners(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("pcCode", pcCode()); + jsonWriter.writeStringField("profitCenterProgramId", profitCenterProgramId()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesManagement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesManagement 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 ResourceTypeRegistrationPropertiesManagement. + */ + public static ResourceTypeRegistrationPropertiesManagement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesManagement deserializedResourceTypeRegistrationPropertiesManagement + = new ResourceTypeRegistrationPropertiesManagement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schemaOwners".equals(fieldName)) { + List schemaOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationPropertiesManagement.withSchemaOwners(schemaOwners); + } else if ("manifestOwners".equals(fieldName)) { + List manifestOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationPropertiesManagement.withManifestOwners(manifestOwners); + } else if ("authorizationOwners".equals(fieldName)) { + List authorizationOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationPropertiesManagement + .withAuthorizationOwners(authorizationOwners); + } else if ("incidentRoutingService".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement + .withIncidentRoutingService(reader.getString()); + } else if ("incidentRoutingTeam".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement + .withIncidentRoutingTeam(reader.getString()); + } else if ("incidentContactEmail".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement + .withIncidentContactEmail(reader.getString()); + } else if ("serviceTreeInfos".equals(fieldName)) { + List serviceTreeInfos + = reader.readArray(reader1 -> ServiceTreeInfo.fromJson(reader1)); + deserializedResourceTypeRegistrationPropertiesManagement.withServiceTreeInfos(serviceTreeInfos); + } else if ("resourceAccessPolicy".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement + .withResourceAccessPolicy(ResourceAccessPolicy.fromString(reader.getString())); + } else if ("resourceAccessRoles".equals(fieldName)) { + List resourceAccessRoles + = reader.readArray(reader1 -> ResourceAccessRole.fromJson(reader1)); + deserializedResourceTypeRegistrationPropertiesManagement + .withResourceAccessRoles(resourceAccessRoles); + } else if ("expeditedRolloutSubmitters".equals(fieldName)) { + List expeditedRolloutSubmitters = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationPropertiesManagement + .withExpeditedRolloutSubmitters(expeditedRolloutSubmitters); + } else if ("errorResponseMessageOptions".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement.withErrorResponseMessageOptions( + ResourceProviderManagementErrorResponseMessageOptions.fromJson(reader)); + } else if ("expeditedRolloutMetadata".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement.withExpeditedRolloutMetadata( + ResourceProviderManagementExpeditedRolloutMetadata.fromJson(reader)); + } else if ("canaryManifestOwners".equals(fieldName)) { + List canaryManifestOwners = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceTypeRegistrationPropertiesManagement + .withCanaryManifestOwners(canaryManifestOwners); + } else if ("pcCode".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement.withPcCode(reader.getString()); + } else if ("profitCenterProgramId".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesManagement + .withProfitCenterProgramId(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesManagement; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesMarketplaceOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesMarketplaceOptions.java new file mode 100644 index 000000000000..c99a5fadbd80 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesMarketplaceOptions.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Marketplace options. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesMarketplaceOptions + implements JsonSerializable { + /* + * Add-on plan conversion allowed. + */ + private Boolean addOnPlanConversionAllowed; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesMarketplaceOptions class. + */ + public ResourceTypeRegistrationPropertiesMarketplaceOptions() { + } + + /** + * Get the addOnPlanConversionAllowed property: Add-on plan conversion allowed. + * + * @return the addOnPlanConversionAllowed value. + */ + public Boolean addOnPlanConversionAllowed() { + return this.addOnPlanConversionAllowed; + } + + /** + * Set the addOnPlanConversionAllowed property: Add-on plan conversion allowed. + * + * @param addOnPlanConversionAllowed the addOnPlanConversionAllowed value to set. + * @return the ResourceTypeRegistrationPropertiesMarketplaceOptions object itself. + */ + public ResourceTypeRegistrationPropertiesMarketplaceOptions + withAddOnPlanConversionAllowed(Boolean addOnPlanConversionAllowed) { + this.addOnPlanConversionAllowed = addOnPlanConversionAllowed; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("addOnPlanConversionAllowed", this.addOnPlanConversionAllowed); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesMarketplaceOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesMarketplaceOptions 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 ResourceTypeRegistrationPropertiesMarketplaceOptions. + */ + public static ResourceTypeRegistrationPropertiesMarketplaceOptions fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesMarketplaceOptions deserializedResourceTypeRegistrationPropertiesMarketplaceOptions + = new ResourceTypeRegistrationPropertiesMarketplaceOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addOnPlanConversionAllowed".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesMarketplaceOptions.addOnPlanConversionAllowed + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesMarketplaceOptions; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRequestHeaderOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRequestHeaderOptions.java index 692f3dc3fdc4..1dff265d9359 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRequestHeaderOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRequestHeaderOptions.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceTypeRegistrationPropertiesRequestHeaderOptions model. + * The request header options. */ @Fluent public final class ResourceTypeRegistrationPropertiesRequestHeaderOptions extends RequestHeaderOptions { @@ -30,6 +30,15 @@ public ResourceTypeRegistrationPropertiesRequestHeaderOptions withOptInHeaders(O return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesRequestHeaderOptions withOptOutHeaders(OptOutHeaderType optOutHeaders) { + super.withOptOutHeaders(optOutHeaders); + return this; + } + /** * Validates the instance. * @@ -46,6 +55,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("optInHeaders", optInHeaders() == null ? null : optInHeaders().toString()); + jsonWriter.writeStringField("optOutHeaders", optOutHeaders() == null ? null : optOutHeaders().toString()); return jsonWriter.writeEndObject(); } @@ -69,6 +79,9 @@ public static ResourceTypeRegistrationPropertiesRequestHeaderOptions fromJson(Js if ("optInHeaders".equals(fieldName)) { deserializedResourceTypeRegistrationPropertiesRequestHeaderOptions .withOptInHeaders(OptInHeaderType.fromString(reader.getString())); + } else if ("optOutHeaders".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesRequestHeaderOptions + .withOptOutHeaders(OptOutHeaderType.fromString(reader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceCache.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceCache.java new file mode 100644 index 000000000000..e667929d3116 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceCache.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resource cache options. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesResourceCache + implements JsonSerializable { + /* + * Enable resource cache. + */ + private Boolean enableResourceCache; + + /* + * Resource cache expiration timespan. This is a TimeSpan property. + */ + private String resourceCacheExpirationTimespan; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesResourceCache class. + */ + public ResourceTypeRegistrationPropertiesResourceCache() { + } + + /** + * Get the enableResourceCache property: Enable resource cache. + * + * @return the enableResourceCache value. + */ + public Boolean enableResourceCache() { + return this.enableResourceCache; + } + + /** + * Set the enableResourceCache property: Enable resource cache. + * + * @param enableResourceCache the enableResourceCache value to set. + * @return the ResourceTypeRegistrationPropertiesResourceCache object itself. + */ + public ResourceTypeRegistrationPropertiesResourceCache withEnableResourceCache(Boolean enableResourceCache) { + this.enableResourceCache = enableResourceCache; + return this; + } + + /** + * Get the resourceCacheExpirationTimespan property: Resource cache expiration timespan. This is a TimeSpan + * property. + * + * @return the resourceCacheExpirationTimespan value. + */ + public String resourceCacheExpirationTimespan() { + return this.resourceCacheExpirationTimespan; + } + + /** + * Set the resourceCacheExpirationTimespan property: Resource cache expiration timespan. This is a TimeSpan + * property. + * + * @param resourceCacheExpirationTimespan the resourceCacheExpirationTimespan value to set. + * @return the ResourceTypeRegistrationPropertiesResourceCache object itself. + */ + public ResourceTypeRegistrationPropertiesResourceCache + withResourceCacheExpirationTimespan(String resourceCacheExpirationTimespan) { + this.resourceCacheExpirationTimespan = resourceCacheExpirationTimespan; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableResourceCache", this.enableResourceCache); + jsonWriter.writeStringField("resourceCacheExpirationTimespan", this.resourceCacheExpirationTimespan); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesResourceCache from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesResourceCache 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 ResourceTypeRegistrationPropertiesResourceCache. + */ + public static ResourceTypeRegistrationPropertiesResourceCache fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesResourceCache deserializedResourceTypeRegistrationPropertiesResourceCache + = new ResourceTypeRegistrationPropertiesResourceCache(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableResourceCache".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceCache.enableResourceCache + = reader.getNullable(JsonReader::getBoolean); + } else if ("resourceCacheExpirationTimespan".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceCache.resourceCacheExpirationTimespan + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesResourceCache; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceGraphConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceGraphConfiguration.java new file mode 100644 index 000000000000..75a5e2f18a8f --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceGraphConfiguration.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The resource graph configuration. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesResourceGraphConfiguration extends ResourceGraphConfiguration { + /** + * Creates an instance of ResourceTypeRegistrationPropertiesResourceGraphConfiguration class. + */ + public ResourceTypeRegistrationPropertiesResourceGraphConfiguration() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesResourceGraphConfiguration withEnabled(Boolean enabled) { + super.withEnabled(enabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesResourceGraphConfiguration withApiVersion(String apiVersion) { + super.withApiVersion(apiVersion); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", enabled()); + jsonWriter.writeStringField("apiVersion", apiVersion()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesResourceGraphConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesResourceGraphConfiguration 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 + * ResourceTypeRegistrationPropertiesResourceGraphConfiguration. + */ + public static ResourceTypeRegistrationPropertiesResourceGraphConfiguration fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesResourceGraphConfiguration deserializedResourceTypeRegistrationPropertiesResourceGraphConfiguration + = new ResourceTypeRegistrationPropertiesResourceGraphConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceGraphConfiguration + .withEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("apiVersion".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceGraphConfiguration + .withApiVersion(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesResourceGraphConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptions.java new file mode 100644 index 000000000000..79bd10e2b099 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptions.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Resource management options. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesResourceManagementOptions + implements JsonSerializable { + /* + * Batch provisioning support. + */ + private ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport batchProvisioningSupport; + + /* + * Delete dependencies. + */ + private List deleteDependencies; + + /* + * Nested provisioning support. + */ + private ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport nestedProvisioningSupport; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesResourceManagementOptions class. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptions() { + } + + /** + * Get the batchProvisioningSupport property: Batch provisioning support. + * + * @return the batchProvisioningSupport value. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + batchProvisioningSupport() { + return this.batchProvisioningSupport; + } + + /** + * Set the batchProvisioningSupport property: Batch provisioning support. + * + * @param batchProvisioningSupport the batchProvisioningSupport value to set. + * @return the ResourceTypeRegistrationPropertiesResourceManagementOptions object itself. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptions withBatchProvisioningSupport( + ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport batchProvisioningSupport) { + this.batchProvisioningSupport = batchProvisioningSupport; + return this; + } + + /** + * Get the deleteDependencies property: Delete dependencies. + * + * @return the deleteDependencies value. + */ + public List deleteDependencies() { + return this.deleteDependencies; + } + + /** + * Set the deleteDependencies property: Delete dependencies. + * + * @param deleteDependencies the deleteDependencies value to set. + * @return the ResourceTypeRegistrationPropertiesResourceManagementOptions object itself. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptions + withDeleteDependencies(List deleteDependencies) { + this.deleteDependencies = deleteDependencies; + return this; + } + + /** + * Get the nestedProvisioningSupport property: Nested provisioning support. + * + * @return the nestedProvisioningSupport value. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + nestedProvisioningSupport() { + return this.nestedProvisioningSupport; + } + + /** + * Set the nestedProvisioningSupport property: Nested provisioning support. + * + * @param nestedProvisioningSupport the nestedProvisioningSupport value to set. + * @return the ResourceTypeRegistrationPropertiesResourceManagementOptions object itself. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptions withNestedProvisioningSupport( + ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport nestedProvisioningSupport) { + this.nestedProvisioningSupport = nestedProvisioningSupport; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (batchProvisioningSupport() != null) { + batchProvisioningSupport().validate(); + } + if (deleteDependencies() != null) { + deleteDependencies().forEach(e -> e.validate()); + } + if (nestedProvisioningSupport() != null) { + nestedProvisioningSupport().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("batchProvisioningSupport", this.batchProvisioningSupport); + jsonWriter.writeArrayField("deleteDependencies", this.deleteDependencies, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("nestedProvisioningSupport", this.nestedProvisioningSupport); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesResourceManagementOptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesResourceManagementOptions 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 + * ResourceTypeRegistrationPropertiesResourceManagementOptions. + */ + public static ResourceTypeRegistrationPropertiesResourceManagementOptions fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesResourceManagementOptions deserializedResourceTypeRegistrationPropertiesResourceManagementOptions + = new ResourceTypeRegistrationPropertiesResourceManagementOptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("batchProvisioningSupport".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceManagementOptions.batchProvisioningSupport + = ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + .fromJson(reader); + } else if ("deleteDependencies".equals(fieldName)) { + List deleteDependencies + = reader.readArray(reader1 -> DeleteDependency.fromJson(reader1)); + deserializedResourceTypeRegistrationPropertiesResourceManagementOptions.deleteDependencies + = deleteDependencies; + } else if ("nestedProvisioningSupport".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceManagementOptions.nestedProvisioningSupport + = ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + .fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesResourceManagementOptions; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport.java new file mode 100644 index 000000000000..d6f1c70af4e9 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Batch provisioning support. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + implements JsonSerializable { + /* + * Supported operations. + */ + private SupportedOperations supportedOperations; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport class. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport() { + } + + /** + * Get the supportedOperations property: Supported operations. + * + * @return the supportedOperations value. + */ + public SupportedOperations supportedOperations() { + return this.supportedOperations; + } + + /** + * Set the supportedOperations property: Supported operations. + * + * @param supportedOperations the supportedOperations value to set. + * @return the ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport object itself. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + withSupportedOperations(SupportedOperations supportedOperations) { + this.supportedOperations = supportedOperations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("supportedOperations", + this.supportedOperations == null ? null : this.supportedOperations.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport from the + * JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport 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 + * ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport. + */ + public static ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport deserializedResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + = new ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("supportedOperations".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport.supportedOperations + = SupportedOperations.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport.java new file mode 100644 index 000000000000..7d0de5ad84ab --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Nested provisioning support. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + implements JsonSerializable { + /* + * Minimum API version. + */ + private String minimumApiVersion; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + * class. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport() { + } + + /** + * Get the minimumApiVersion property: Minimum API version. + * + * @return the minimumApiVersion value. + */ + public String minimumApiVersion() { + return this.minimumApiVersion; + } + + /** + * Set the minimumApiVersion property: Minimum API version. + * + * @param minimumApiVersion the minimumApiVersion value to set. + * @return the ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport object itself. + */ + public ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + withMinimumApiVersion(String minimumApiVersion) { + this.minimumApiVersion = minimumApiVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("minimumApiVersion", this.minimumApiVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport from + * the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport 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 + * ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport. + */ + public static ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport deserializedResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + = new ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minimumApiVersion".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport.minimumApiVersion + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceMovePolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceMovePolicy.java index 55b50ece8b15..0bf6f3afcbd8 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceMovePolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceMovePolicy.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceTypeRegistrationPropertiesResourceMovePolicy model. + * The resource move policy. */ @Fluent public final class ResourceTypeRegistrationPropertiesResourceMovePolicy extends ResourceMovePolicy { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceQueryManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceQueryManagement.java new file mode 100644 index 000000000000..cc26b47cad69 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceQueryManagement.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resource query management options. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesResourceQueryManagement + implements JsonSerializable { + /* + * Filter option. + */ + private FilterOption filterOption; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesResourceQueryManagement class. + */ + public ResourceTypeRegistrationPropertiesResourceQueryManagement() { + } + + /** + * Get the filterOption property: Filter option. + * + * @return the filterOption value. + */ + public FilterOption filterOption() { + return this.filterOption; + } + + /** + * Set the filterOption property: Filter option. + * + * @param filterOption the filterOption value to set. + * @return the ResourceTypeRegistrationPropertiesResourceQueryManagement object itself. + */ + public ResourceTypeRegistrationPropertiesResourceQueryManagement withFilterOption(FilterOption filterOption) { + this.filterOption = filterOption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filterOption", this.filterOption == null ? null : this.filterOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesResourceQueryManagement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesResourceQueryManagement 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 + * ResourceTypeRegistrationPropertiesResourceQueryManagement. + */ + public static ResourceTypeRegistrationPropertiesResourceQueryManagement fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesResourceQueryManagement deserializedResourceTypeRegistrationPropertiesResourceQueryManagement + = new ResourceTypeRegistrationPropertiesResourceQueryManagement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filterOption".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceQueryManagement.filterOption + = FilterOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesResourceQueryManagement; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.java new file mode 100644 index 000000000000..c8902221cead --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Resource type common attribute management. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement + implements JsonSerializable { + /* + * Common api versions merge mode. + */ + private CommonApiVersionsMergeMode commonApiVersionsMergeMode; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement class. + */ + public ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement() { + } + + /** + * Get the commonApiVersionsMergeMode property: Common api versions merge mode. + * + * @return the commonApiVersionsMergeMode value. + */ + public CommonApiVersionsMergeMode commonApiVersionsMergeMode() { + return this.commonApiVersionsMergeMode; + } + + /** + * Set the commonApiVersionsMergeMode property: Common api versions merge mode. + * + * @param commonApiVersionsMergeMode the commonApiVersionsMergeMode value to set. + * @return the ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement object itself. + */ + public ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement + withCommonApiVersionsMergeMode(CommonApiVersionsMergeMode commonApiVersionsMergeMode) { + this.commonApiVersionsMergeMode = commonApiVersionsMergeMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("commonApiVersionsMergeMode", + this.commonApiVersionsMergeMode == null ? null : this.commonApiVersionsMergeMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement 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 + * ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement. + */ + public static ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement + fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement deserializedResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement + = new ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("commonApiVersionsMergeMode".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement.commonApiVersionsMergeMode + = CommonApiVersionsMergeMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRoutingRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRoutingRule.java new file mode 100644 index 000000000000..6756502f28f0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesRoutingRule.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Routing rule. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesRoutingRule + implements JsonSerializable { + /* + * Hosted resource type. + */ + private String hostResourceType; + + /** + * Creates an instance of ResourceTypeRegistrationPropertiesRoutingRule class. + */ + public ResourceTypeRegistrationPropertiesRoutingRule() { + } + + /** + * Get the hostResourceType property: Hosted resource type. + * + * @return the hostResourceType value. + */ + public String hostResourceType() { + return this.hostResourceType; + } + + /** + * Set the hostResourceType property: Hosted resource type. + * + * @param hostResourceType the hostResourceType value to set. + * @return the ResourceTypeRegistrationPropertiesRoutingRule object itself. + */ + public ResourceTypeRegistrationPropertiesRoutingRule withHostResourceType(String hostResourceType) { + this.hostResourceType = hostResourceType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("hostResourceType", this.hostResourceType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesRoutingRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesRoutingRule 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 ResourceTypeRegistrationPropertiesRoutingRule. + */ + public static ResourceTypeRegistrationPropertiesRoutingRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesRoutingRule deserializedResourceTypeRegistrationPropertiesRoutingRule + = new ResourceTypeRegistrationPropertiesRoutingRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hostResourceType".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesRoutingRule.hostResourceType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesRoutingRule; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java index 4de2024796c9..8e46b9632544 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.java @@ -14,7 +14,7 @@ import java.util.List; /** - * The ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications model. + * The subscription lifecycle notification specifications. */ @Fluent public final class ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.java index 030abc56a64a..d172db0b0f65 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.java @@ -12,7 +12,7 @@ import java.util.List; /** - * The ResourceTypeRegistrationPropertiesTemplateDeploymentOptions model. + * The template deployment options. */ @Fluent public final class ResourceTypeRegistrationPropertiesTemplateDeploymentOptions extends TemplateDeploymentOptions { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.java new file mode 100644 index 000000000000..e10838a43085 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The template deployment policy. + */ +@Fluent +public final class ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy extends TemplateDeploymentPolicy { + /** + * Creates an instance of ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy class. + */ + public ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy() { + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + withCapabilities(TemplateDeploymentCapabilities capabilities) { + super.withCapabilities(capabilities); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + withPreflightOptions(TemplateDeploymentPreflightOptions preflightOptions) { + super.withPreflightOptions(preflightOptions); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + withPreflightNotifications(TemplateDeploymentPreflightNotifications preflightNotifications) { + super.withPreflightNotifications(preflightNotifications); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (capabilities() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property capabilities in model ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy")); + } + if (preflightOptions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property preflightOptions in model ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy")); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("capabilities", capabilities() == null ? null : capabilities().toString()); + jsonWriter.writeStringField("preflightOptions", + preflightOptions() == null ? null : preflightOptions().toString()); + jsonWriter.writeStringField("preflightNotifications", + preflightNotifications() == null ? null : preflightNotifications().toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy 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 + * ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy. + */ + public static ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy deserializedResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + = new ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capabilities".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + .withCapabilities(TemplateDeploymentCapabilities.fromString(reader.getString())); + } else if ("preflightOptions".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + .withPreflightOptions(TemplateDeploymentPreflightOptions.fromString(reader.getString())); + } else if ("preflightNotifications".equals(fieldName)) { + deserializedResourceTypeRegistrationPropertiesTemplateDeploymentPolicy.withPreflightNotifications( + TemplateDeploymentPreflightNotifications.fromString(reader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceTypeRegistrationPropertiesTemplateDeploymentPolicy; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrations.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrations.java index 4b697cbb100c..653d8e72ebb0 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrations.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRegistrations.java @@ -42,24 +42,23 @@ public interface ResourceTypeRegistrations { * * @param providerNamespace The name of the resource provider hosted within ProviderHub. * @param resourceType The resource type. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse(String providerNamespace, String resourceType, Context context); + void deleteByResourceGroup(String providerNamespace, String resourceType); /** * Deletes a resource type. * * @param providerNamespace The name of the resource provider hosted within ProviderHub. * @param resourceType The resource type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByResourceGroup(String providerNamespace, String resourceType); + void delete(String providerNamespace, String resourceType, Context context); /** * Gets the list of the resource types for the given provider. @@ -125,9 +124,8 @@ public interface ResourceTypeRegistrations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new ResourceTypeRegistration resource. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRequestHeaderOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRequestHeaderOptions.java index bcd671e6ae5b..160e2664db78 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRequestHeaderOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeRequestHeaderOptions.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The ResourceTypeRequestHeaderOptions model. + * The request header options. */ @Fluent public final class ResourceTypeRequestHeaderOptions extends RequestHeaderOptions { @@ -30,6 +30,15 @@ public ResourceTypeRequestHeaderOptions withOptInHeaders(OptInHeaderType optInHe return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeRequestHeaderOptions withOptOutHeaders(OptOutHeaderType optOutHeaders) { + super.withOptOutHeaders(optOutHeaders); + return this; + } + /** * Validates the instance. * @@ -46,6 +55,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("optInHeaders", optInHeaders() == null ? null : optInHeaders().toString()); + jsonWriter.writeStringField("optOutHeaders", optOutHeaders() == null ? null : optOutHeaders().toString()); return jsonWriter.writeEndObject(); } @@ -68,6 +78,9 @@ public static ResourceTypeRequestHeaderOptions fromJson(JsonReader jsonReader) t if ("optInHeaders".equals(fieldName)) { deserializedResourceTypeRequestHeaderOptions .withOptInHeaders(OptInHeaderType.fromString(reader.getString())); + } else if ("optOutHeaders".equals(fieldName)) { + deserializedResourceTypeRequestHeaderOptions + .withOptOutHeaders(OptOutHeaderType.fromString(reader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeSku.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeSku.java index b412b514cb63..47c595c61b49 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeSku.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeSku.java @@ -19,12 +19,12 @@ @Fluent public class ResourceTypeSku implements JsonSerializable { /* - * The skuSettings property. + * The sku settings. */ private List skuSettings; /* - * The provisioningState property. + * The provisioning state. */ private ProvisioningState provisioningState; @@ -35,7 +35,7 @@ public ResourceTypeSku() { } /** - * Get the skuSettings property: The skuSettings property. + * Get the skuSettings property: The sku settings. * * @return the skuSettings value. */ @@ -44,7 +44,7 @@ public List skuSettings() { } /** - * Set the skuSettings property: The skuSettings property. + * Set the skuSettings property: The sku settings. * * @param skuSettings the skuSettings value to set. * @return the ResourceTypeSku object itself. @@ -55,7 +55,7 @@ public ResourceTypeSku withSkuSettings(List skuSettings) { } /** - * Get the provisioningState property: The provisioningState property. + * Get the provisioningState property: The provisioning state. * * @return the provisioningState value. */ @@ -64,12 +64,12 @@ public ProvisioningState provisioningState() { } /** - * Set the provisioningState property: The provisioningState property. + * Set the provisioningState property: The provisioning state. * * @param provisioningState the provisioningState value to set. * @return the ResourceTypeSku object itself. */ - public ResourceTypeSku withProvisioningState(ProvisioningState provisioningState) { + ResourceTypeSku withProvisioningState(ProvisioningState provisioningState) { this.provisioningState = provisioningState; return this; } @@ -97,8 +97,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("skuSettings", this.skuSettings, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - this.provisioningState == null ? null : this.provisioningState.toString()); return jsonWriter.writeEndObject(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeTemplateDeploymentPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeTemplateDeploymentPolicy.java index 0a2d5b684758..dce80153766e 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeTemplateDeploymentPolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceTypeTemplateDeploymentPolicy.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ResourceTypeTemplateDeploymentPolicy model. + * The template deployment policy. */ @Fluent public final class ResourceTypeTemplateDeploymentPolicy extends TemplateDeploymentPolicy { @@ -41,6 +41,16 @@ public ResourceTypeTemplateDeploymentPolicy withCapabilities(TemplateDeploymentC return this; } + /** + * {@inheritDoc} + */ + @Override + public ResourceTypeTemplateDeploymentPolicy + withPreflightNotifications(TemplateDeploymentPreflightNotifications preflightNotifications) { + super.withPreflightNotifications(preflightNotifications); + return this; + } + /** * Validates the instance. * @@ -71,6 +81,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("capabilities", capabilities() == null ? null : capabilities().toString()); jsonWriter.writeStringField("preflightOptions", preflightOptions() == null ? null : preflightOptions().toString()); + jsonWriter.writeStringField("preflightNotifications", + preflightNotifications() == null ? null : preflightNotifications().toString()); return jsonWriter.writeEndObject(); } @@ -97,6 +109,9 @@ public static ResourceTypeTemplateDeploymentPolicy fromJson(JsonReader jsonReade } else if ("preflightOptions".equals(fieldName)) { deserializedResourceTypeTemplateDeploymentPolicy .withPreflightOptions(TemplateDeploymentPreflightOptions.fromString(reader.getString())); + } else if ("preflightNotifications".equals(fieldName)) { + deserializedResourceTypeTemplateDeploymentPolicy.withPreflightNotifications( + TemplateDeploymentPreflightNotifications.fromString(reader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceValidation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceValidation.java index b7d3fe4d96c0..d1fe52083939 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceValidation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ResourceValidation.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ResourceValidation. + * The resource validation. */ public final class ResourceValidation extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Role.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Role.java new file mode 100644 index 000000000000..0d5b0b569eb0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/Role.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The ownership role the application has on the resource types. The service owner role gives the application owner + * permissions. The limited owner role gives elevated permissions but does not allow all the permissions of a service + * owner, such as read/write on internal metadata. + */ +public final class Role extends ExpandableStringEnum { + /** + * Static value ServiceOwner for Role. + */ + public static final Role SERVICE_OWNER = fromString("ServiceOwner"); + + /** + * Static value LimitedOwner for Role. + */ + public static final Role LIMITED_OWNER = fromString("LimitedOwner"); + + /** + * Creates a new instance of Role value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Role() { + } + + /** + * Creates or finds a Role from its string representation. + * + * @param name a name to look for. + * @return the corresponding Role. + */ + public static Role fromString(String name) { + return fromString(name, Role.class); + } + + /** + * Gets known Role values. + * + * @return known Role values. + */ + public static Collection values() { + return values(Role.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RolloutStatusBase.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RolloutStatusBase.java index 983031443e65..e1fe252c30ef 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RolloutStatusBase.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RolloutStatusBase.java @@ -19,12 +19,12 @@ @Fluent public class RolloutStatusBase implements JsonSerializable { /* - * The completedRegions property. + * The completed regions. */ private List completedRegions; /* - * Dictionary of + * The failed or skipped regions. */ private Map failedOrSkippedRegions; @@ -35,7 +35,7 @@ public RolloutStatusBase() { } /** - * Get the completedRegions property: The completedRegions property. + * Get the completedRegions property: The completed regions. * * @return the completedRegions value. */ @@ -44,7 +44,7 @@ public List completedRegions() { } /** - * Set the completedRegions property: The completedRegions property. + * Set the completedRegions property: The completed regions. * * @param completedRegions the completedRegions value to set. * @return the RolloutStatusBase object itself. @@ -55,7 +55,7 @@ public RolloutStatusBase withCompletedRegions(List completedRegions) { } /** - * Get the failedOrSkippedRegions property: Dictionary of <ExtendedErrorInfo>. + * Get the failedOrSkippedRegions property: The failed or skipped regions. * * @return the failedOrSkippedRegions value. */ @@ -64,7 +64,7 @@ public Map failedOrSkippedRegions() { } /** - * Set the failedOrSkippedRegions property: Dictionary of <ExtendedErrorInfo>. + * Set the failedOrSkippedRegions property: The failed or skipped regions. * * @param failedOrSkippedRegions the failedOrSkippedRegions value to set. * @return the RolloutStatusBase object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RoutingType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RoutingType.java index c738fc029780..a95d17055ed4 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RoutingType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/RoutingType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for RoutingType. + * The routing type. */ public final class RoutingType extends ExpandableStringEnum { /** @@ -56,6 +56,32 @@ public final class RoutingType extends ExpandableStringEnum { */ public static final RoutingType CASCADE_EXTENSION = fromString("CascadeExtension"); + /** + * Static value ChildFanout for RoutingType. + */ + public static final RoutingType CHILD_FANOUT = fromString("ChildFanout"); + + /** + * Static value CascadeAuthorizedExtension for RoutingType. + */ + public static final RoutingType CASCADE_AUTHORIZED_EXTENSION = fromString("CascadeAuthorizedExtension"); + + /** + * Static value BypassEndpointSelectionOptimization for RoutingType. + */ + public static final RoutingType BYPASS_ENDPOINT_SELECTION_OPTIMIZATION + = fromString("BypassEndpointSelectionOptimization"); + + /** + * Static value LocationMapping for RoutingType. + */ + public static final RoutingType LOCATION_MAPPING = fromString("LocationMapping"); + + /** + * Static value ServiceFanout for RoutingType. + */ + public static final RoutingType SERVICE_FANOUT = fromString("ServiceFanout"); + /** * Creates a new instance of RoutingType value. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServerFailureResponseMessageType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServerFailureResponseMessageType.java new file mode 100644 index 000000000000..a9e1479b002c --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServerFailureResponseMessageType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of server failure response message. + */ +public final class ServerFailureResponseMessageType extends ExpandableStringEnum { + /** + * Static value NotSpecified for ServerFailureResponseMessageType. + */ + public static final ServerFailureResponseMessageType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value OutageReporting for ServerFailureResponseMessageType. + */ + public static final ServerFailureResponseMessageType OUTAGE_REPORTING = fromString("OutageReporting"); + + /** + * Creates a new instance of ServerFailureResponseMessageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerFailureResponseMessageType() { + } + + /** + * Creates or finds a ServerFailureResponseMessageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServerFailureResponseMessageType. + */ + public static ServerFailureResponseMessageType fromString(String name) { + return fromString(name, ServerFailureResponseMessageType.class); + } + + /** + * Gets known ServerFailureResponseMessageType values. + * + * @return known ServerFailureResponseMessageType values. + */ + public static Collection values() { + return values(ServerFailureResponseMessageType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceClientOptionsType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceClientOptionsType.java new file mode 100644 index 000000000000..8f4a37497c56 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceClientOptionsType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ServiceClientOptionsType. + */ +public final class ServiceClientOptionsType extends ExpandableStringEnum { + /** + * Static value NotSpecified for ServiceClientOptionsType. + */ + public static final ServiceClientOptionsType NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value DisableAutomaticDecompression for ServiceClientOptionsType. + */ + public static final ServiceClientOptionsType DISABLE_AUTOMATIC_DECOMPRESSION + = fromString("DisableAutomaticDecompression"); + + /** + * Creates a new instance of ServiceClientOptionsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceClientOptionsType() { + } + + /** + * Creates or finds a ServiceClientOptionsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceClientOptionsType. + */ + public static ServiceClientOptionsType fromString(String name) { + return fromString(name, ServiceClientOptionsType.class); + } + + /** + * Gets known ServiceClientOptionsType values. + * + * @return known ServiceClientOptionsType values. + */ + public static Collection values() { + return values(ServiceClientOptionsType.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceFeatureFlagAction.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceFeatureFlagAction.java new file mode 100644 index 000000000000..8cb7d4e8fbcb --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceFeatureFlagAction.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The service feature flag. + */ +public final class ServiceFeatureFlagAction extends ExpandableStringEnum { + /** + * Static value DoNotCreate for ServiceFeatureFlagAction. + */ + public static final ServiceFeatureFlagAction DO_NOT_CREATE = fromString("DoNotCreate"); + + /** + * Static value Create for ServiceFeatureFlagAction. + */ + public static final ServiceFeatureFlagAction CREATE = fromString("Create"); + + /** + * Creates a new instance of ServiceFeatureFlagAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceFeatureFlagAction() { + } + + /** + * Creates or finds a ServiceFeatureFlagAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceFeatureFlagAction. + */ + public static ServiceFeatureFlagAction fromString(String name) { + return fromString(name, ServiceFeatureFlagAction.class); + } + + /** + * Gets known ServiceFeatureFlagAction values. + * + * @return known ServiceFeatureFlagAction values. + */ + public static Collection values() { + return values(ServiceFeatureFlagAction.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceStatus.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceStatus.java new file mode 100644 index 000000000000..7ce69b35af13 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The status. + */ +public final class ServiceStatus extends ExpandableStringEnum { + /** + * Static value Active for ServiceStatus. + */ + public static final ServiceStatus ACTIVE = fromString("Active"); + + /** + * Static value Inactive for ServiceStatus. + */ + public static final ServiceStatus INACTIVE = fromString("Inactive"); + + /** + * Creates a new instance of ServiceStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceStatus() { + } + + /** + * Creates or finds a ServiceStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceStatus. + */ + public static ServiceStatus fromString(String name) { + return fromString(name, ServiceStatus.class); + } + + /** + * Gets known ServiceStatus values. + * + * @return known ServiceStatus values. + */ + public static Collection values() { + return values(ServiceStatus.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceTreeInfo.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceTreeInfo.java index 3178a0007f92..5ebae45e4694 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceTreeInfo.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ServiceTreeInfo.java @@ -17,15 +17,20 @@ @Fluent public final class ServiceTreeInfo implements JsonSerializable { /* - * The serviceId property. + * The service id. */ private String serviceId; /* - * The componentId property. + * The component id. */ private String componentId; + /* + * The readiness. + */ + private Readiness readiness; + /** * Creates an instance of ServiceTreeInfo class. */ @@ -33,7 +38,7 @@ public ServiceTreeInfo() { } /** - * Get the serviceId property: The serviceId property. + * Get the serviceId property: The service id. * * @return the serviceId value. */ @@ -42,7 +47,7 @@ public String serviceId() { } /** - * Set the serviceId property: The serviceId property. + * Set the serviceId property: The service id. * * @param serviceId the serviceId value to set. * @return the ServiceTreeInfo object itself. @@ -53,7 +58,7 @@ public ServiceTreeInfo withServiceId(String serviceId) { } /** - * Get the componentId property: The componentId property. + * Get the componentId property: The component id. * * @return the componentId value. */ @@ -62,7 +67,7 @@ public String componentId() { } /** - * Set the componentId property: The componentId property. + * Set the componentId property: The component id. * * @param componentId the componentId value to set. * @return the ServiceTreeInfo object itself. @@ -72,6 +77,26 @@ public ServiceTreeInfo withComponentId(String componentId) { return this; } + /** + * Get the readiness property: The readiness. + * + * @return the readiness value. + */ + public Readiness readiness() { + return this.readiness; + } + + /** + * Set the readiness property: The readiness. + * + * @param readiness the readiness value to set. + * @return the ServiceTreeInfo object itself. + */ + public ServiceTreeInfo withReadiness(Readiness readiness) { + this.readiness = readiness; + return this; + } + /** * Validates the instance. * @@ -88,6 +113,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("serviceId", this.serviceId); jsonWriter.writeStringField("componentId", this.componentId); + jsonWriter.writeStringField("readiness", this.readiness == null ? null : this.readiness.toString()); return jsonWriter.writeEndObject(); } @@ -110,6 +136,8 @@ public static ServiceTreeInfo fromJson(JsonReader jsonReader) throws IOException deserializedServiceTreeInfo.serviceId = reader.getString(); } else if ("componentId".equals(fieldName)) { deserializedServiceTreeInfo.componentId = reader.getString(); + } else if ("readiness".equals(fieldName)) { + deserializedServiceTreeInfo.readiness = Readiness.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SignedRequestScope.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SignedRequestScope.java new file mode 100644 index 000000000000..629be1942eb3 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SignedRequestScope.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The signed request scope. + */ +public final class SignedRequestScope extends ExpandableStringEnum { + /** + * Static value ResourceUri for SignedRequestScope. + */ + public static final SignedRequestScope RESOURCE_URI = fromString("ResourceUri"); + + /** + * Static value Endpoint for SignedRequestScope. + */ + public static final SignedRequestScope ENDPOINT = fromString("Endpoint"); + + /** + * Creates a new instance of SignedRequestScope value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SignedRequestScope() { + } + + /** + * Creates or finds a SignedRequestScope from its string representation. + * + * @param name a name to look for. + * @return the corresponding SignedRequestScope. + */ + public static SignedRequestScope fromString(String name) { + return fromString(name, SignedRequestScope.class); + } + + /** + * Gets known SignedRequestScope values. + * + * @return known SignedRequestScope values. + */ + public static Collection values() { + return values(SignedRequestScope.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkipNotifications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkipNotifications.java new file mode 100644 index 000000000000..ceab9f7009a0 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkipNotifications.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether notifications should be skipped. + */ +public final class SkipNotifications extends ExpandableStringEnum { + /** + * Static value Unspecified for SkipNotifications. + */ + public static final SkipNotifications UNSPECIFIED = fromString("Unspecified"); + + /** + * Static value Enabled for SkipNotifications. + */ + public static final SkipNotifications ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for SkipNotifications. + */ + public static final SkipNotifications DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of SkipNotifications value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkipNotifications() { + } + + /** + * Creates or finds a SkipNotifications from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkipNotifications. + */ + public static SkipNotifications fromString(String name) { + return fromString(name, SkipNotifications.class); + } + + /** + * Gets known SkipNotifications values. + * + * @return known SkipNotifications values. + */ + public static Collection values() { + return values(SkipNotifications.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapability.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapability.java index 59b52c09469d..05651e6184a2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapability.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapability.java @@ -18,12 +18,12 @@ @Fluent public final class SkuCapability implements JsonSerializable { /* - * The name property. + * The name. */ private String name; /* - * The value property. + * The value. */ private String value; @@ -34,7 +34,7 @@ public SkuCapability() { } /** - * Get the name property: The name property. + * Get the name property: The name. * * @return the name value. */ @@ -43,7 +43,7 @@ public String name() { } /** - * Set the name property: The name property. + * Set the name property: The name. * * @param name the name value to set. * @return the SkuCapability object itself. @@ -54,7 +54,7 @@ public SkuCapability withName(String name) { } /** - * Get the value property: The value property. + * Get the value property: The value. * * @return the value value. */ @@ -63,7 +63,7 @@ public String value() { } /** - * Set the value property: The value property. + * Set the value property: The value. * * @param value the value value to set. * @return the SkuCapability object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapacity.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapacity.java index 8e9af61f8898..4f3a239e039f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapacity.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCapacity.java @@ -17,22 +17,22 @@ @Fluent public class SkuCapacity implements JsonSerializable { /* - * The minimum property. + * The minimum. */ private int minimum; /* - * The maximum property. + * The maximum. */ private Integer maximum; /* - * The default property. + * The default. */ private Integer defaultProperty; /* - * The scaleType property. + * The scale type. */ private SkuScaleType scaleType; @@ -43,7 +43,7 @@ public SkuCapacity() { } /** - * Get the minimum property: The minimum property. + * Get the minimum property: The minimum. * * @return the minimum value. */ @@ -52,7 +52,7 @@ public int minimum() { } /** - * Set the minimum property: The minimum property. + * Set the minimum property: The minimum. * * @param minimum the minimum value to set. * @return the SkuCapacity object itself. @@ -63,7 +63,7 @@ public SkuCapacity withMinimum(int minimum) { } /** - * Get the maximum property: The maximum property. + * Get the maximum property: The maximum. * * @return the maximum value. */ @@ -72,7 +72,7 @@ public Integer maximum() { } /** - * Set the maximum property: The maximum property. + * Set the maximum property: The maximum. * * @param maximum the maximum value to set. * @return the SkuCapacity object itself. @@ -83,7 +83,7 @@ public SkuCapacity withMaximum(Integer maximum) { } /** - * Get the defaultProperty property: The default property. + * Get the defaultProperty property: The default. * * @return the defaultProperty value. */ @@ -92,7 +92,7 @@ public Integer defaultProperty() { } /** - * Set the defaultProperty property: The default property. + * Set the defaultProperty property: The default. * * @param defaultProperty the defaultProperty value to set. * @return the SkuCapacity object itself. @@ -103,7 +103,7 @@ public SkuCapacity withDefaultProperty(Integer defaultProperty) { } /** - * Get the scaleType property: The scaleType property. + * Get the scaleType property: The scale type. * * @return the scaleType value. */ @@ -112,7 +112,7 @@ public SkuScaleType scaleType() { } /** - * Set the scaleType property: The scaleType property. + * Set the scaleType property: The scale type. * * @param scaleType the scaleType value to set. * @return the SkuCapacity object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCost.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCost.java index ff601f17a443..f8d4c2adab48 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCost.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuCost.java @@ -18,17 +18,17 @@ @Fluent public final class SkuCost implements JsonSerializable { /* - * The meterId property. + * The meter id. */ private String meterId; /* - * The quantity property. + * The quantity. */ private Integer quantity; /* - * The extendedUnit property. + * The extended unit. */ private String extendedUnit; @@ -39,7 +39,7 @@ public SkuCost() { } /** - * Get the meterId property: The meterId property. + * Get the meterId property: The meter id. * * @return the meterId value. */ @@ -48,7 +48,7 @@ public String meterId() { } /** - * Set the meterId property: The meterId property. + * Set the meterId property: The meter id. * * @param meterId the meterId value to set. * @return the SkuCost object itself. @@ -59,7 +59,7 @@ public SkuCost withMeterId(String meterId) { } /** - * Get the quantity property: The quantity property. + * Get the quantity property: The quantity. * * @return the quantity value. */ @@ -68,7 +68,7 @@ public Integer quantity() { } /** - * Set the quantity property: The quantity property. + * Set the quantity property: The quantity. * * @param quantity the quantity value to set. * @return the SkuCost object itself. @@ -79,7 +79,7 @@ public SkuCost withQuantity(Integer quantity) { } /** - * Get the extendedUnit property: The extendedUnit property. + * Get the extendedUnit property: The extended unit. * * @return the extendedUnit value. */ @@ -88,7 +88,7 @@ public String extendedUnit() { } /** - * Set the extendedUnit property: The extendedUnit property. + * Set the extendedUnit property: The extended unit. * * @param extendedUnit the extendedUnit value to set. * @return the SkuCost object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuLocationInfo.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuLocationInfo.java index 5ffdf08c06b3..f11b97a93fb2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuLocationInfo.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuLocationInfo.java @@ -19,27 +19,27 @@ @Fluent public final class SkuLocationInfo implements JsonSerializable { /* - * The location property. + * The location. */ private String location; /* - * The zones property. + * The zones. */ private List zones; /* - * The zoneDetails property. + * The zone details. */ private List zoneDetails; /* - * The extendedLocations property. + * The extended locations. */ private List extendedLocations; /* - * The type property. + * The type. */ private ExtendedLocationType type; @@ -50,7 +50,7 @@ public SkuLocationInfo() { } /** - * Get the location property: The location property. + * Get the location property: The location. * * @return the location value. */ @@ -59,7 +59,7 @@ public String location() { } /** - * Set the location property: The location property. + * Set the location property: The location. * * @param location the location value to set. * @return the SkuLocationInfo object itself. @@ -70,7 +70,7 @@ public SkuLocationInfo withLocation(String location) { } /** - * Get the zones property: The zones property. + * Get the zones property: The zones. * * @return the zones value. */ @@ -79,7 +79,7 @@ public List zones() { } /** - * Set the zones property: The zones property. + * Set the zones property: The zones. * * @param zones the zones value to set. * @return the SkuLocationInfo object itself. @@ -90,7 +90,7 @@ public SkuLocationInfo withZones(List zones) { } /** - * Get the zoneDetails property: The zoneDetails property. + * Get the zoneDetails property: The zone details. * * @return the zoneDetails value. */ @@ -99,7 +99,7 @@ public List zoneDetails() { } /** - * Set the zoneDetails property: The zoneDetails property. + * Set the zoneDetails property: The zone details. * * @param zoneDetails the zoneDetails value to set. * @return the SkuLocationInfo object itself. @@ -110,7 +110,7 @@ public SkuLocationInfo withZoneDetails(List zoneDetails) { } /** - * Get the extendedLocations property: The extendedLocations property. + * Get the extendedLocations property: The extended locations. * * @return the extendedLocations value. */ @@ -119,7 +119,7 @@ public List extendedLocations() { } /** - * Set the extendedLocations property: The extendedLocations property. + * Set the extendedLocations property: The extended locations. * * @param extendedLocations the extendedLocations value to set. * @return the SkuLocationInfo object itself. @@ -130,7 +130,7 @@ public SkuLocationInfo withExtendedLocations(List extendedLocations) { } /** - * Get the type property: The type property. + * Get the type property: The type. * * @return the type value. */ @@ -139,7 +139,7 @@ public ExtendedLocationType type() { } /** - * Set the type property: The type property. + * Set the type property: The type. * * @param type the type value to set. * @return the SkuLocationInfo object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResource.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResource.java index 6e7c332261ef..3d00106cbdb7 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResource.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResource.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.providerhub.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; @@ -39,6 +40,13 @@ public interface SkuResource { */ SkuResourceProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner object. * diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceArrayResponseWithContinuation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceArrayResponseWithContinuation.java index f1598ff04889..c55d7003d24c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceArrayResponseWithContinuation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceArrayResponseWithContinuation.java @@ -20,7 +20,7 @@ public final class SkuResourceArrayResponseWithContinuation implements JsonSerializable { /* - * The value property. + * The sku resources. */ private List value; @@ -36,7 +36,7 @@ public SkuResourceArrayResponseWithContinuation() { } /** - * Get the value property: The value property. + * Get the value property: The sku resources. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Set the value property: The value property. + * Set the value property: The sku resources. * * @param value the value value to set. * @return the SkuResourceArrayResponseWithContinuation object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceProperties.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceProperties.java index c491bf7ea7d6..f274a24ad5b5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceProperties.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuResourceProperties.java @@ -17,6 +17,11 @@ */ @Fluent public final class SkuResourceProperties extends ResourceTypeSku { + /* + * The provisioning state. + */ + private ProvisioningState provisioningState; + /** * Creates an instance of SkuResourceProperties class. */ @@ -24,20 +29,21 @@ public SkuResourceProperties() { } /** - * {@inheritDoc} + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. */ @Override - public SkuResourceProperties withSkuSettings(List skuSettings) { - super.withSkuSettings(skuSettings); - return this; + public ProvisioningState provisioningState() { + return this.provisioningState; } /** * {@inheritDoc} */ @Override - public SkuResourceProperties withProvisioningState(ProvisioningState provisioningState) { - super.withProvisioningState(provisioningState); + public SkuResourceProperties withSkuSettings(List skuSettings) { + super.withSkuSettings(skuSettings); return this; } @@ -66,8 +72,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("skuSettings", skuSettings(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("provisioningState", - provisioningState() == null ? null : provisioningState().toString()); return jsonWriter.writeEndObject(); } @@ -91,8 +95,8 @@ public static SkuResourceProperties fromJson(JsonReader jsonReader) throws IOExc List skuSettings = reader.readArray(reader1 -> SkuSetting.fromJson(reader1)); deserializedSkuResourceProperties.withSkuSettings(skuSettings); } else if ("provisioningState".equals(fieldName)) { - deserializedSkuResourceProperties - .withProvisioningState(ProvisioningState.fromString(reader.getString())); + deserializedSkuResourceProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuScaleType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuScaleType.java index 5431380690d6..dc045573b006 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuScaleType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuScaleType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for SkuScaleType. + * The scale type. */ public final class SkuScaleType extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSetting.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSetting.java index 6f8aca662261..3916d6f81872 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSetting.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSetting.java @@ -19,62 +19,62 @@ @Fluent public final class SkuSetting implements JsonSerializable { /* - * The name property. + * The name. */ private String name; /* - * The tier property. + * The tier. */ private String tier; /* - * The size property. + * The size. */ private String size; /* - * The family property. + * The family. */ private String family; /* - * The kind property. + * The kind. */ private String kind; /* - * The locations property. + * The locations. */ private List locations; /* - * The locationInfo property. + * The location info. */ private List locationInfo; /* - * The requiredQuotaIds property. + * The required quota ids. */ private List requiredQuotaIds; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; /* - * The capacity property. + * The capacity. */ private SkuSettingCapacity capacity; /* - * The costs property. + * The costs. */ private List costs; /* - * The capabilities property. + * The capabilities. */ private List capabilities; @@ -85,7 +85,7 @@ public SkuSetting() { } /** - * Get the name property: The name property. + * Get the name property: The name. * * @return the name value. */ @@ -94,7 +94,7 @@ public String name() { } /** - * Set the name property: The name property. + * Set the name property: The name. * * @param name the name value to set. * @return the SkuSetting object itself. @@ -105,7 +105,7 @@ public SkuSetting withName(String name) { } /** - * Get the tier property: The tier property. + * Get the tier property: The tier. * * @return the tier value. */ @@ -114,7 +114,7 @@ public String tier() { } /** - * Set the tier property: The tier property. + * Set the tier property: The tier. * * @param tier the tier value to set. * @return the SkuSetting object itself. @@ -125,7 +125,7 @@ public SkuSetting withTier(String tier) { } /** - * Get the size property: The size property. + * Get the size property: The size. * * @return the size value. */ @@ -134,7 +134,7 @@ public String size() { } /** - * Set the size property: The size property. + * Set the size property: The size. * * @param size the size value to set. * @return the SkuSetting object itself. @@ -145,7 +145,7 @@ public SkuSetting withSize(String size) { } /** - * Get the family property: The family property. + * Get the family property: The family. * * @return the family value. */ @@ -154,7 +154,7 @@ public String family() { } /** - * Set the family property: The family property. + * Set the family property: The family. * * @param family the family value to set. * @return the SkuSetting object itself. @@ -165,7 +165,7 @@ public SkuSetting withFamily(String family) { } /** - * Get the kind property: The kind property. + * Get the kind property: The kind. * * @return the kind value. */ @@ -174,7 +174,7 @@ public String kind() { } /** - * Set the kind property: The kind property. + * Set the kind property: The kind. * * @param kind the kind value to set. * @return the SkuSetting object itself. @@ -185,7 +185,7 @@ public SkuSetting withKind(String kind) { } /** - * Get the locations property: The locations property. + * Get the locations property: The locations. * * @return the locations value. */ @@ -194,7 +194,7 @@ public List locations() { } /** - * Set the locations property: The locations property. + * Set the locations property: The locations. * * @param locations the locations value to set. * @return the SkuSetting object itself. @@ -205,7 +205,7 @@ public SkuSetting withLocations(List locations) { } /** - * Get the locationInfo property: The locationInfo property. + * Get the locationInfo property: The location info. * * @return the locationInfo value. */ @@ -214,7 +214,7 @@ public List locationInfo() { } /** - * Set the locationInfo property: The locationInfo property. + * Set the locationInfo property: The location info. * * @param locationInfo the locationInfo value to set. * @return the SkuSetting object itself. @@ -225,7 +225,7 @@ public SkuSetting withLocationInfo(List locationInfo) { } /** - * Get the requiredQuotaIds property: The requiredQuotaIds property. + * Get the requiredQuotaIds property: The required quota ids. * * @return the requiredQuotaIds value. */ @@ -234,7 +234,7 @@ public List requiredQuotaIds() { } /** - * Set the requiredQuotaIds property: The requiredQuotaIds property. + * Set the requiredQuotaIds property: The required quota ids. * * @param requiredQuotaIds the requiredQuotaIds value to set. * @return the SkuSetting object itself. @@ -245,7 +245,7 @@ public SkuSetting withRequiredQuotaIds(List requiredQuotaIds) { } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -254,7 +254,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the SkuSetting object itself. @@ -265,7 +265,7 @@ public SkuSetting withRequiredFeatures(List requiredFeatures) { } /** - * Get the capacity property: The capacity property. + * Get the capacity property: The capacity. * * @return the capacity value. */ @@ -274,7 +274,7 @@ public SkuSettingCapacity capacity() { } /** - * Set the capacity property: The capacity property. + * Set the capacity property: The capacity. * * @param capacity the capacity value to set. * @return the SkuSetting object itself. @@ -285,7 +285,7 @@ public SkuSetting withCapacity(SkuSettingCapacity capacity) { } /** - * Get the costs property: The costs property. + * Get the costs property: The costs. * * @return the costs value. */ @@ -294,7 +294,7 @@ public List costs() { } /** - * Set the costs property: The costs property. + * Set the costs property: The costs. * * @param costs the costs value to set. * @return the SkuSetting object itself. @@ -305,7 +305,7 @@ public SkuSetting withCosts(List costs) { } /** - * Get the capabilities property: The capabilities property. + * Get the capabilities property: The capabilities. * * @return the capabilities value. */ @@ -314,7 +314,7 @@ public List capabilities() { } /** - * Set the capabilities property: The capabilities property. + * Set the capabilities property: The capabilities. * * @param capabilities the capabilities value to set. * @return the SkuSetting object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSettingCapacity.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSettingCapacity.java index fc2399c1c263..1b5349e9777d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSettingCapacity.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuSettingCapacity.java @@ -11,7 +11,7 @@ import java.io.IOException; /** - * The SkuSettingCapacity model. + * The capacity. */ @Fluent public final class SkuSettingCapacity extends SkuCapacity { diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuZoneDetail.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuZoneDetail.java index 051e72d0818a..58228c8857e5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuZoneDetail.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SkuZoneDetail.java @@ -18,12 +18,12 @@ @Fluent public final class SkuZoneDetail implements JsonSerializable { /* - * The name property. + * The name. */ private List name; /* - * The capabilities property. + * The capabilities. */ private List capabilities; @@ -34,7 +34,7 @@ public SkuZoneDetail() { } /** - * Get the name property: The name property. + * Get the name property: The name. * * @return the name value. */ @@ -43,7 +43,7 @@ public List name() { } /** - * Set the name property: The name property. + * Set the name property: The name. * * @param name the name value to set. * @return the SkuZoneDetail object itself. @@ -54,7 +54,7 @@ public SkuZoneDetail withName(List name) { } /** - * Get the capabilities property: The capabilities property. + * Get the capabilities property: The capabilities. * * @return the capabilities value. */ @@ -63,7 +63,7 @@ public List capabilities() { } /** - * Set the capabilities property: The capabilities property. + * Set the capabilities property: The capabilities. * * @param capabilities the capabilities value to set. * @return the SkuZoneDetail object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriberSetting.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriberSetting.java new file mode 100644 index 000000000000..10a7792dad94 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriberSetting.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The SubscriberSetting model. + */ +@Fluent +public final class SubscriberSetting implements JsonSerializable { + /* + * The filter rules. + */ + private List filterRules; + + /** + * Creates an instance of SubscriberSetting class. + */ + public SubscriberSetting() { + } + + /** + * Get the filterRules property: The filter rules. + * + * @return the filterRules value. + */ + public List filterRules() { + return this.filterRules; + } + + /** + * Set the filterRules property: The filter rules. + * + * @param filterRules the filterRules value to set. + * @return the SubscriberSetting object itself. + */ + public SubscriberSetting withFilterRules(List filterRules) { + this.filterRules = filterRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filterRules() != null) { + filterRules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("filterRules", this.filterRules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriberSetting from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriberSetting 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 SubscriberSetting. + */ + public static SubscriberSetting fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriberSetting deserializedSubscriberSetting = new SubscriberSetting(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filterRules".equals(fieldName)) { + List filterRules = reader.readArray(reader1 -> FilterRule.fromJson(reader1)); + deserializedSubscriberSetting.filterRules = filterRules; + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriberSetting; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionLifecycleNotificationSpecifications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionLifecycleNotificationSpecifications.java index 9c4646e7a5d8..26903922d9a2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionLifecycleNotificationSpecifications.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionLifecycleNotificationSpecifications.java @@ -21,12 +21,12 @@ public class SubscriptionLifecycleNotificationSpecifications implements JsonSerializable { /* - * The subscriptionStateOverrideActions property. + * The subscription state override actions. */ private List subscriptionStateOverrideActions; /* - * The softDeleteTTL property. + * The soft delete TTL. */ private Duration softDeleteTtl; @@ -37,7 +37,7 @@ public SubscriptionLifecycleNotificationSpecifications() { } /** - * Get the subscriptionStateOverrideActions property: The subscriptionStateOverrideActions property. + * Get the subscriptionStateOverrideActions property: The subscription state override actions. * * @return the subscriptionStateOverrideActions value. */ @@ -46,7 +46,7 @@ public List subscriptionStateOverrideActions() } /** - * Set the subscriptionStateOverrideActions property: The subscriptionStateOverrideActions property. + * Set the subscriptionStateOverrideActions property: The subscription state override actions. * * @param subscriptionStateOverrideActions the subscriptionStateOverrideActions value to set. * @return the SubscriptionLifecycleNotificationSpecifications object itself. @@ -58,7 +58,7 @@ public List subscriptionStateOverrideActions() } /** - * Get the softDeleteTtl property: The softDeleteTTL property. + * Get the softDeleteTtl property: The soft delete TTL. * * @return the softDeleteTtl value. */ @@ -67,7 +67,7 @@ public Duration softDeleteTtl() { } /** - * Set the softDeleteTtl property: The softDeleteTTL property. + * Set the softDeleteTtl property: The soft delete TTL. * * @param softDeleteTtl the softDeleteTtl value to set. * @return the SubscriptionLifecycleNotificationSpecifications object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionNotificationOperation.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionNotificationOperation.java index 4950c9b9244d..08f3d160c3bd 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionNotificationOperation.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionNotificationOperation.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for SubscriptionNotificationOperation. + * The action. */ public final class SubscriptionNotificationOperation extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionReregistrationResult.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionReregistrationResult.java index 811e85f8d4bd..5ca683255d09 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionReregistrationResult.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionReregistrationResult.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for SubscriptionReregistrationResult. + * The subscription reregistration result. */ public final class SubscriptionReregistrationResult extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionState.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionState.java index a79d2a192b47..b5068ba70f62 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionState.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionState.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for SubscriptionState. + * The subscription state. */ public final class SubscriptionState extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateOverrideAction.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateOverrideAction.java index 5c9e8f0b2187..37bb76c3eeff 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateOverrideAction.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateOverrideAction.java @@ -18,12 +18,12 @@ @Fluent public final class SubscriptionStateOverrideAction implements JsonSerializable { /* - * The state property. + * The state. */ private SubscriptionTransitioningState state; /* - * The action property. + * The action. */ private SubscriptionNotificationOperation action; @@ -34,7 +34,7 @@ public SubscriptionStateOverrideAction() { } /** - * Get the state property: The state property. + * Get the state property: The state. * * @return the state value. */ @@ -43,7 +43,7 @@ public SubscriptionTransitioningState state() { } /** - * Set the state property: The state property. + * Set the state property: The state. * * @param state the state value to set. * @return the SubscriptionStateOverrideAction object itself. @@ -54,7 +54,7 @@ public SubscriptionStateOverrideAction withState(SubscriptionTransitioningState } /** - * Get the action property: The action property. + * Get the action property: The action. * * @return the action value. */ @@ -63,7 +63,7 @@ public SubscriptionNotificationOperation action() { } /** - * Set the action property: The action property. + * Set the action property: The action. * * @param action the action value to set. * @return the SubscriptionStateOverrideAction object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateRule.java index aa2905ac6d64..80d20ce6d86d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionStateRule.java @@ -18,12 +18,12 @@ @Fluent public final class SubscriptionStateRule implements JsonSerializable { /* - * The state property. + * The subscription state. */ private SubscriptionState state; /* - * The allowedActions property. + * The allowed actions. */ private List allowedActions; @@ -34,7 +34,7 @@ public SubscriptionStateRule() { } /** - * Get the state property: The state property. + * Get the state property: The subscription state. * * @return the state value. */ @@ -43,7 +43,7 @@ public SubscriptionState state() { } /** - * Set the state property: The state property. + * Set the state property: The subscription state. * * @param state the state value to set. * @return the SubscriptionStateRule object itself. @@ -54,7 +54,7 @@ public SubscriptionStateRule withState(SubscriptionState state) { } /** - * Get the allowedActions property: The allowedActions property. + * Get the allowedActions property: The allowed actions. * * @return the allowedActions value. */ @@ -63,7 +63,7 @@ public List allowedActions() { } /** - * Set the allowedActions property: The allowedActions property. + * Set the allowedActions property: The allowed actions. * * @param allowedActions the allowedActions value to set. * @return the SubscriptionStateRule object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionTransitioningState.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionTransitioningState.java index 1a21ddb930f1..2ec916722454 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionTransitioningState.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SubscriptionTransitioningState.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for SubscriptionTransitioningState. + * The state. */ public final class SubscriptionTransitioningState extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SupportedOperations.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SupportedOperations.java new file mode 100644 index 000000000000..72541879007b --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SupportedOperations.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Supported operations. + */ +public final class SupportedOperations extends ExpandableStringEnum { + /** + * Static value NotSpecified for SupportedOperations. + */ + public static final SupportedOperations NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Get for SupportedOperations. + */ + public static final SupportedOperations GET = fromString("Get"); + + /** + * Static value Delete for SupportedOperations. + */ + public static final SupportedOperations DELETE = fromString("Delete"); + + /** + * Creates a new instance of SupportedOperations value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SupportedOperations() { + } + + /** + * Creates or finds a SupportedOperations from its string representation. + * + * @param name a name to look for. + * @return the corresponding SupportedOperations. + */ + public static SupportedOperations fromString(String name) { + return fromString(name, SupportedOperations.class); + } + + /** + * Gets known SupportedOperations values. + * + * @return known SupportedOperations values. + */ + public static Collection values() { + return values(SupportedOperations.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SwaggerSpecification.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SwaggerSpecification.java index cb0a97b25631..5dea483e936f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SwaggerSpecification.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/SwaggerSpecification.java @@ -18,12 +18,12 @@ @Fluent public final class SwaggerSpecification implements JsonSerializable { /* - * The apiVersions property. + * The api versions. */ private List apiVersions; /* - * The swaggerSpecFolderUri property. + * The swagger spec folder uri. */ private String swaggerSpecFolderUri; @@ -34,7 +34,7 @@ public SwaggerSpecification() { } /** - * Get the apiVersions property: The apiVersions property. + * Get the apiVersions property: The api versions. * * @return the apiVersions value. */ @@ -43,7 +43,7 @@ public List apiVersions() { } /** - * Set the apiVersions property: The apiVersions property. + * Set the apiVersions property: The api versions. * * @param apiVersions the apiVersions value to set. * @return the SwaggerSpecification object itself. @@ -54,7 +54,7 @@ public SwaggerSpecification withApiVersions(List apiVersions) { } /** - * Get the swaggerSpecFolderUri property: The swaggerSpecFolderUri property. + * Get the swaggerSpecFolderUri property: The swagger spec folder uri. * * @return the swaggerSpecFolderUri value. */ @@ -63,7 +63,7 @@ public String swaggerSpecFolderUri() { } /** - * Set the swaggerSpecFolderUri property: The swaggerSpecFolderUri property. + * Set the swaggerSpecFolderUri property: The swagger spec folder uri. * * @param swaggerSpecFolderUri the swaggerSpecFolderUri value to set. * @return the SwaggerSpecification object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentCapabilities.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentCapabilities.java index 016d5b0f82db..56a7612f7822 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentCapabilities.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentCapabilities.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for TemplateDeploymentCapabilities. + * The capabilities. */ public final class TemplateDeploymentCapabilities extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentOptions.java index f536b5abf15d..97584364b9aa 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentOptions.java @@ -18,12 +18,12 @@ @Fluent public class TemplateDeploymentOptions implements JsonSerializable { /* - * The preflightSupported property. + * Whether preflight is supported. */ private Boolean preflightSupported; /* - * The preflightOptions property. + * The preflight options. */ private List preflightOptions; @@ -34,7 +34,7 @@ public TemplateDeploymentOptions() { } /** - * Get the preflightSupported property: The preflightSupported property. + * Get the preflightSupported property: Whether preflight is supported. * * @return the preflightSupported value. */ @@ -43,7 +43,7 @@ public Boolean preflightSupported() { } /** - * Set the preflightSupported property: The preflightSupported property. + * Set the preflightSupported property: Whether preflight is supported. * * @param preflightSupported the preflightSupported value to set. * @return the TemplateDeploymentOptions object itself. @@ -54,7 +54,7 @@ public TemplateDeploymentOptions withPreflightSupported(Boolean preflightSupport } /** - * Get the preflightOptions property: The preflightOptions property. + * Get the preflightOptions property: The preflight options. * * @return the preflightOptions value. */ @@ -63,7 +63,7 @@ public List preflightOptions() { } /** - * Set the preflightOptions property: The preflightOptions property. + * Set the preflightOptions property: The preflight options. * * @param preflightOptions the preflightOptions value to set. * @return the TemplateDeploymentOptions object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPolicy.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPolicy.java index bb12793a9fed..22724cba196c 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPolicy.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPolicy.java @@ -18,15 +18,20 @@ @Fluent public class TemplateDeploymentPolicy implements JsonSerializable { /* - * The capabilities property. + * The capabilities. */ private TemplateDeploymentCapabilities capabilities; /* - * The preflightOptions property. + * The preflight options. */ private TemplateDeploymentPreflightOptions preflightOptions; + /* + * The preflight notifications. + */ + private TemplateDeploymentPreflightNotifications preflightNotifications; + /** * Creates an instance of TemplateDeploymentPolicy class. */ @@ -34,7 +39,7 @@ public TemplateDeploymentPolicy() { } /** - * Get the capabilities property: The capabilities property. + * Get the capabilities property: The capabilities. * * @return the capabilities value. */ @@ -43,7 +48,7 @@ public TemplateDeploymentCapabilities capabilities() { } /** - * Set the capabilities property: The capabilities property. + * Set the capabilities property: The capabilities. * * @param capabilities the capabilities value to set. * @return the TemplateDeploymentPolicy object itself. @@ -54,7 +59,7 @@ public TemplateDeploymentPolicy withCapabilities(TemplateDeploymentCapabilities } /** - * Get the preflightOptions property: The preflightOptions property. + * Get the preflightOptions property: The preflight options. * * @return the preflightOptions value. */ @@ -63,7 +68,7 @@ public TemplateDeploymentPreflightOptions preflightOptions() { } /** - * Set the preflightOptions property: The preflightOptions property. + * Set the preflightOptions property: The preflight options. * * @param preflightOptions the preflightOptions value to set. * @return the TemplateDeploymentPolicy object itself. @@ -73,6 +78,27 @@ public TemplateDeploymentPolicy withPreflightOptions(TemplateDeploymentPreflight return this; } + /** + * Get the preflightNotifications property: The preflight notifications. + * + * @return the preflightNotifications value. + */ + public TemplateDeploymentPreflightNotifications preflightNotifications() { + return this.preflightNotifications; + } + + /** + * Set the preflightNotifications property: The preflight notifications. + * + * @param preflightNotifications the preflightNotifications value to set. + * @return the TemplateDeploymentPolicy object itself. + */ + public TemplateDeploymentPolicy + withPreflightNotifications(TemplateDeploymentPreflightNotifications preflightNotifications) { + this.preflightNotifications = preflightNotifications; + return this; + } + /** * Validates the instance. * @@ -102,6 +128,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("capabilities", this.capabilities == null ? null : this.capabilities.toString()); jsonWriter.writeStringField("preflightOptions", this.preflightOptions == null ? null : this.preflightOptions.toString()); + jsonWriter.writeStringField("preflightNotifications", + this.preflightNotifications == null ? null : this.preflightNotifications.toString()); return jsonWriter.writeEndObject(); } @@ -127,6 +155,9 @@ public static TemplateDeploymentPolicy fromJson(JsonReader jsonReader) throws IO } else if ("preflightOptions".equals(fieldName)) { deserializedTemplateDeploymentPolicy.preflightOptions = TemplateDeploymentPreflightOptions.fromString(reader.getString()); + } else if ("preflightNotifications".equals(fieldName)) { + deserializedTemplateDeploymentPolicy.preflightNotifications + = TemplateDeploymentPreflightNotifications.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightNotifications.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightNotifications.java new file mode 100644 index 000000000000..b354921b8e5c --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightNotifications.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The preflight notifications. + */ +public final class TemplateDeploymentPreflightNotifications + extends ExpandableStringEnum { + /** + * Static value None for TemplateDeploymentPreflightNotifications. + */ + public static final TemplateDeploymentPreflightNotifications NONE = fromString("None"); + + /** + * Static value UnregisteredSubscriptions for TemplateDeploymentPreflightNotifications. + */ + public static final TemplateDeploymentPreflightNotifications UNREGISTERED_SUBSCRIPTIONS + = fromString("UnregisteredSubscriptions"); + + /** + * Creates a new instance of TemplateDeploymentPreflightNotifications value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TemplateDeploymentPreflightNotifications() { + } + + /** + * Creates or finds a TemplateDeploymentPreflightNotifications from its string representation. + * + * @param name a name to look for. + * @return the corresponding TemplateDeploymentPreflightNotifications. + */ + public static TemplateDeploymentPreflightNotifications fromString(String name) { + return fromString(name, TemplateDeploymentPreflightNotifications.class); + } + + /** + * Gets known TemplateDeploymentPreflightNotifications values. + * + * @return known TemplateDeploymentPreflightNotifications values. + */ + public static Collection values() { + return values(TemplateDeploymentPreflightNotifications.class); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightOptions.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightOptions.java index 842cdd574793..8a4f859e3e9b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightOptions.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TemplateDeploymentPreflightOptions.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for TemplateDeploymentPreflightOptions. + * The preflight options. */ public final class TemplateDeploymentPreflightOptions extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyExtension.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyExtension.java new file mode 100644 index 000000000000..4571982c11a9 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyExtension.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ThirdPartyExtension model. + */ +@Fluent +public final class ThirdPartyExtension implements JsonSerializable { + /* + * Name of third party extension. + */ + private String name; + + /** + * Creates an instance of ThirdPartyExtension class. + */ + public ThirdPartyExtension() { + } + + /** + * Get the name property: Name of third party extension. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of third party extension. + * + * @param name the name value to set. + * @return the ThirdPartyExtension object itself. + */ + public ThirdPartyExtension withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ThirdPartyExtension from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ThirdPartyExtension 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 ThirdPartyExtension. + */ + public static ThirdPartyExtension fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ThirdPartyExtension deserializedThirdPartyExtension = new ThirdPartyExtension(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedThirdPartyExtension.name = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedThirdPartyExtension; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyProviderAuthorization.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyProviderAuthorization.java index 64423e81cc68..19025c01fd4b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyProviderAuthorization.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThirdPartyProviderAuthorization.java @@ -18,12 +18,12 @@ @Fluent public class ThirdPartyProviderAuthorization implements JsonSerializable { /* - * The authorizations property. + * The authorizations. */ private List authorizations; /* - * The managedByTenantId property. + * The managed by tenant id. */ private String managedByTenantId; @@ -34,7 +34,7 @@ public ThirdPartyProviderAuthorization() { } /** - * Get the authorizations property: The authorizations property. + * Get the authorizations property: The authorizations. * * @return the authorizations value. */ @@ -43,7 +43,7 @@ public List authorizations() { } /** - * Set the authorizations property: The authorizations property. + * Set the authorizations property: The authorizations. * * @param authorizations the authorizations value to set. * @return the ThirdPartyProviderAuthorization object itself. @@ -54,7 +54,7 @@ public ThirdPartyProviderAuthorization withAuthorizations(List { /* - * The type property. + * The throttling metric type */ private ThrottlingMetricType type; /* - * The limit property. + * The limit. */ private long limit; /* - * The interval property. + * The interval. */ private Duration interval; @@ -41,7 +41,7 @@ public ThrottlingMetric() { } /** - * Get the type property: The type property. + * Get the type property: The throttling metric type. * * @return the type value. */ @@ -50,7 +50,7 @@ public ThrottlingMetricType type() { } /** - * Set the type property: The type property. + * Set the type property: The throttling metric type. * * @param type the type value to set. * @return the ThrottlingMetric object itself. @@ -61,7 +61,7 @@ public ThrottlingMetric withType(ThrottlingMetricType type) { } /** - * Get the limit property: The limit property. + * Get the limit property: The limit. * * @return the limit value. */ @@ -70,7 +70,7 @@ public long limit() { } /** - * Set the limit property: The limit property. + * Set the limit property: The limit. * * @param limit the limit value to set. * @return the ThrottlingMetric object itself. @@ -81,7 +81,7 @@ public ThrottlingMetric withLimit(long limit) { } /** - * Get the interval property: The interval property. + * Get the interval property: The interval. * * @return the interval value. */ @@ -90,7 +90,7 @@ public Duration interval() { } /** - * Set the interval property: The interval property. + * Set the interval property: The interval. * * @param interval the interval value to set. * @return the ThrottlingMetric object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingMetricType.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingMetricType.java index 40b185b6b3b5..28a8fd974e2b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingMetricType.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingMetricType.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ThrottlingMetricType. + * The throttling metric type. */ public final class ThrottlingMetricType extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingRule.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingRule.java index 98b24d23772a..8e7ea3fcd807 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingRule.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/ThrottlingRule.java @@ -19,20 +19,25 @@ @Fluent public final class ThrottlingRule implements JsonSerializable { /* - * The action property. + * The action. */ private String action; /* - * The metrics property. + * The metrics. */ private List metrics; /* - * The requiredFeatures property. + * The required features. */ private List requiredFeatures; + /* + * The application id. + */ + private List applicationId; + /** * Creates an instance of ThrottlingRule class. */ @@ -40,7 +45,7 @@ public ThrottlingRule() { } /** - * Get the action property: The action property. + * Get the action property: The action. * * @return the action value. */ @@ -49,7 +54,7 @@ public String action() { } /** - * Set the action property: The action property. + * Set the action property: The action. * * @param action the action value to set. * @return the ThrottlingRule object itself. @@ -60,7 +65,7 @@ public ThrottlingRule withAction(String action) { } /** - * Get the metrics property: The metrics property. + * Get the metrics property: The metrics. * * @return the metrics value. */ @@ -69,7 +74,7 @@ public List metrics() { } /** - * Set the metrics property: The metrics property. + * Set the metrics property: The metrics. * * @param metrics the metrics value to set. * @return the ThrottlingRule object itself. @@ -80,7 +85,7 @@ public ThrottlingRule withMetrics(List metrics) { } /** - * Get the requiredFeatures property: The requiredFeatures property. + * Get the requiredFeatures property: The required features. * * @return the requiredFeatures value. */ @@ -89,7 +94,7 @@ public List requiredFeatures() { } /** - * Set the requiredFeatures property: The requiredFeatures property. + * Set the requiredFeatures property: The required features. * * @param requiredFeatures the requiredFeatures value to set. * @return the ThrottlingRule object itself. @@ -99,6 +104,26 @@ public ThrottlingRule withRequiredFeatures(List requiredFeatures) { return this; } + /** + * Get the applicationId property: The application id. + * + * @return the applicationId value. + */ + public List applicationId() { + return this.applicationId; + } + + /** + * Set the applicationId property: The application id. + * + * @param applicationId the applicationId value to set. + * @return the ThrottlingRule object itself. + */ + public ThrottlingRule withApplicationId(List applicationId) { + this.applicationId = applicationId; + return this; + } + /** * Validates the instance. * @@ -129,6 +154,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("metrics", this.metrics, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("requiredFeatures", this.requiredFeatures, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("applicationId", this.applicationId, + (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -156,6 +183,9 @@ public static ThrottlingRule fromJson(JsonReader jsonReader) throws IOException } else if ("requiredFeatures".equals(fieldName)) { List requiredFeatures = reader.readArray(reader1 -> reader1.getString()); deserializedThrottlingRule.requiredFeatures = requiredFeatures; + } else if ("applicationId".equals(fieldName)) { + List applicationId = reader.readArray(reader1 -> reader1.getString()); + deserializedThrottlingRule.applicationId = applicationId; } else { reader.skipChildren(); } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TokenAuthConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TokenAuthConfiguration.java new file mode 100644 index 000000000000..12ac9843bfe3 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TokenAuthConfiguration.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The TokenAuthConfiguration model. + */ +@Fluent +public final class TokenAuthConfiguration implements JsonSerializable { + /* + * The authentication scheme. + */ + private AuthenticationScheme authenticationScheme; + + /* + * The signed request scope. + */ + private SignedRequestScope signedRequestScope; + + /* + * Whether certification authentication fallback is disabled. + */ + private Boolean disableCertificateAuthenticationFallback; + + /** + * Creates an instance of TokenAuthConfiguration class. + */ + public TokenAuthConfiguration() { + } + + /** + * Get the authenticationScheme property: The authentication scheme. + * + * @return the authenticationScheme value. + */ + public AuthenticationScheme authenticationScheme() { + return this.authenticationScheme; + } + + /** + * Set the authenticationScheme property: The authentication scheme. + * + * @param authenticationScheme the authenticationScheme value to set. + * @return the TokenAuthConfiguration object itself. + */ + public TokenAuthConfiguration withAuthenticationScheme(AuthenticationScheme authenticationScheme) { + this.authenticationScheme = authenticationScheme; + return this; + } + + /** + * Get the signedRequestScope property: The signed request scope. + * + * @return the signedRequestScope value. + */ + public SignedRequestScope signedRequestScope() { + return this.signedRequestScope; + } + + /** + * Set the signedRequestScope property: The signed request scope. + * + * @param signedRequestScope the signedRequestScope value to set. + * @return the TokenAuthConfiguration object itself. + */ + public TokenAuthConfiguration withSignedRequestScope(SignedRequestScope signedRequestScope) { + this.signedRequestScope = signedRequestScope; + return this; + } + + /** + * Get the disableCertificateAuthenticationFallback property: Whether certification authentication fallback is + * disabled. + * + * @return the disableCertificateAuthenticationFallback value. + */ + public Boolean disableCertificateAuthenticationFallback() { + return this.disableCertificateAuthenticationFallback; + } + + /** + * Set the disableCertificateAuthenticationFallback property: Whether certification authentication fallback is + * disabled. + * + * @param disableCertificateAuthenticationFallback the disableCertificateAuthenticationFallback value to set. + * @return the TokenAuthConfiguration object itself. + */ + public TokenAuthConfiguration + withDisableCertificateAuthenticationFallback(Boolean disableCertificateAuthenticationFallback) { + this.disableCertificateAuthenticationFallback = disableCertificateAuthenticationFallback; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authenticationScheme", + this.authenticationScheme == null ? null : this.authenticationScheme.toString()); + jsonWriter.writeStringField("signedRequestScope", + this.signedRequestScope == null ? null : this.signedRequestScope.toString()); + jsonWriter.writeBooleanField("disableCertificateAuthenticationFallback", + this.disableCertificateAuthenticationFallback); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TokenAuthConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TokenAuthConfiguration 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 TokenAuthConfiguration. + */ + public static TokenAuthConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TokenAuthConfiguration deserializedTokenAuthConfiguration = new TokenAuthConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authenticationScheme".equals(fieldName)) { + deserializedTokenAuthConfiguration.authenticationScheme + = AuthenticationScheme.fromString(reader.getString()); + } else if ("signedRequestScope".equals(fieldName)) { + deserializedTokenAuthConfiguration.signedRequestScope + = SignedRequestScope.fromString(reader.getString()); + } else if ("disableCertificateAuthenticationFallback".equals(fieldName)) { + deserializedTokenAuthConfiguration.disableCertificateAuthenticationFallback + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedTokenAuthConfiguration; + }); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionCategory.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionCategory.java index 961bdae5c960..46db45c6c318 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionCategory.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionCategory.java @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for TrafficRegionCategory. + * The next traffic region. */ public final class TrafficRegionCategory extends ExpandableStringEnum { /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionRolloutConfiguration.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionRolloutConfiguration.java index 0f4a37e75b91..3c645c9c0b8b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionRolloutConfiguration.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TrafficRegionRolloutConfiguration.java @@ -19,7 +19,7 @@ @Fluent public class TrafficRegionRolloutConfiguration extends TrafficRegions { /* - * The waitDuration property. + * The wait duration. */ private Duration waitDuration; @@ -30,7 +30,7 @@ public TrafficRegionRolloutConfiguration() { } /** - * Get the waitDuration property: The waitDuration property. + * Get the waitDuration property: The wait duration. * * @return the waitDuration value. */ @@ -39,7 +39,7 @@ public Duration waitDuration() { } /** - * Set the waitDuration property: The waitDuration property. + * Set the waitDuration property: The wait duration. * * @param waitDuration the waitDuration value to set. * @return the TrafficRegionRolloutConfiguration object itself. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TypedErrorInfo.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TypedErrorInfo.java index 92ab71e06f52..e4fde6e41627 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TypedErrorInfo.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/TypedErrorInfo.java @@ -13,17 +13,17 @@ import java.io.IOException; /** - * The TypedErrorInfo model. + * Error information. */ @Fluent public final class TypedErrorInfo implements JsonSerializable { /* - * The type property. + * The type of the error. */ private String type; /* - * Any object + * The error information. */ private Object info; @@ -34,7 +34,7 @@ public TypedErrorInfo() { } /** - * Get the type property: The type property. + * Get the type property: The type of the error. * * @return the type value. */ @@ -43,7 +43,7 @@ public String type() { } /** - * Set the type property: The type property. + * Set the type property: The type of the error. * * @param type the type value to set. * @return the TypedErrorInfo object itself. @@ -54,7 +54,7 @@ public TypedErrorInfo withType(String type) { } /** - * Get the info property: Any object. + * Get the info property: The error information. * * @return the info value. */ diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/package-info.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/package-info.java index b58f70c27321..aaef654f0033 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/package-info.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/models/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the data models for ProviderHub. - * Microsoft ProviderHub. + * Provider Hub. */ package com.azure.resourcemanager.providerhub.models; diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/package-info.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/package-info.java index db257e3a32af..680ed98f5fcb 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/package-info.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/java/com/azure/resourcemanager/providerhub/package-info.java @@ -4,6 +4,6 @@ /** * Package containing the classes for ProviderHub. - * Microsoft ProviderHub. + * Provider Hub. */ package com.azure.resourcemanager.providerhub; diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/proxy-config.json b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/proxy-config.json index 7ff2d6cf55ba..99d40ac8aa08 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/proxy-config.json +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.providerhub.implementation.CustomRolloutsClientImpl$CustomRolloutsService"],["com.azure.resourcemanager.providerhub.implementation.DefaultRolloutsClientImpl$DefaultRolloutsService"],["com.azure.resourcemanager.providerhub.implementation.NotificationRegistrationsClientImpl$NotificationRegistrationsService"],["com.azure.resourcemanager.providerhub.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.providerhub.implementation.ProviderRegistrationsClientImpl$ProviderRegistrationsService"],["com.azure.resourcemanager.providerhub.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.providerhub.implementation.ResourceTypeRegistrationsClientImpl$ResourceTypeRegistrationsService"],["com.azure.resourcemanager.providerhub.implementation.SkusClientImpl$SkusService"]] \ No newline at end of file +[["com.azure.resourcemanager.providerhub.implementation.AuthorizedApplicationsClientImpl$AuthorizedApplicationsService"],["com.azure.resourcemanager.providerhub.implementation.CustomRolloutsClientImpl$CustomRolloutsService"],["com.azure.resourcemanager.providerhub.implementation.DefaultRolloutsClientImpl$DefaultRolloutsService"],["com.azure.resourcemanager.providerhub.implementation.NewRegionFrontloadReleasesClientImpl$NewRegionFrontloadReleasesService"],["com.azure.resourcemanager.providerhub.implementation.NotificationRegistrationsClientImpl$NotificationRegistrationsService"],["com.azure.resourcemanager.providerhub.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.providerhub.implementation.ProviderMonitorSettingsClientImpl$ProviderMonitorSettingsService"],["com.azure.resourcemanager.providerhub.implementation.ProviderRegistrationsClientImpl$ProviderRegistrationsService"],["com.azure.resourcemanager.providerhub.implementation.ResourceActionsClientImpl$ResourceActionsService"],["com.azure.resourcemanager.providerhub.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.providerhub.implementation.ResourceTypeRegistrationsClientImpl$ResourceTypeRegistrationsService"],["com.azure.resourcemanager.providerhub.implementation.SkusClientImpl$SkusService"]] \ No newline at end of file diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/reflect-config.json b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/reflect-config.json index 8130252188be..0637a088a01e 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/reflect-config.json +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-providerhub/reflect-config.json @@ -1 +1 @@ -[{"name":"com.azure.resourcemanager.providerhub.models.Error","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.providerhub.models.ErrorInnerError","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.providerhub.models.InnerError","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true}] \ No newline at end of file +[] \ No newline at end of file diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/azure-resourcemanager-providerhub.properties b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/azure-resourcemanager-providerhub.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/main/resources/azure-resourcemanager-providerhub.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..40e3b99c5d2d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsCreateOrUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +import com.azure.resourcemanager.providerhub.models.ApplicationDataAuthorization; +import com.azure.resourcemanager.providerhub.models.ApplicationProviderAuthorization; +import com.azure.resourcemanager.providerhub.models.AuthorizedApplicationProperties; +import com.azure.resourcemanager.providerhub.models.Role; +import java.util.Arrays; +import java.util.UUID; + +/** + * Samples for AuthorizedApplications CreateOrUpdate. + */ +public final class AuthorizedApplicationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_CreateOrUpdate.json + */ + /** + * Sample code: AuthorizedApplications_CreateOrUpdate. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + authorizedApplicationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications() + .define(UUID.fromString("760505bf-dcfa-4311-b890-18da392a00b2")) + .withExistingProviderRegistration("Microsoft.Contoso") + .withProperties(new AuthorizedApplicationProperties() + .withProviderAuthorization( + new ApplicationProviderAuthorization().withRoleDefinitionId("123456bf-gkur-2098-b890-98da392a00b2") + .withManagedByRoleDefinitionId("1a3b5c7d-8e9f-10g1-1h12-i13j14k1")) + .withDataAuthorizations(Arrays.asList(new ApplicationDataAuthorization().withRole(Role.SERVICE_OWNER) + .withResourceTypes(Arrays.asList("*"))))) + .create(); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsDeleteSamples.java new file mode 100644 index 000000000000..5539bb205b32 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +import java.util.UUID; + +/** + * Samples for AuthorizedApplications Delete. + */ +public final class AuthorizedApplicationsDeleteSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_Delete.json + */ + /** + * Sample code: AuthorizedApplications_Delete. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void authorizedApplicationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications() + .deleteWithResponse("Microsoft.Contoso", UUID.fromString("760505bf-dcfa-4311-b890-18da392a00b2"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsGetSamples.java new file mode 100644 index 000000000000..0634eeae2c99 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +import java.util.UUID; + +/** + * Samples for AuthorizedApplications Get. + */ +public final class AuthorizedApplicationsGetSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_Get.json + */ + /** + * Sample code: AuthorizedApplications_Get. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void authorizedApplicationsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications() + .getWithResponse("Microsoft.Contoso", UUID.fromString("760505bf-dcfa-4311-b890-18da392a00b2"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsListSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsListSamples.java new file mode 100644 index 000000000000..4c0bd0c5dbf4 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/AuthorizedApplicationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for AuthorizedApplications List. + */ +public final class AuthorizedApplicationsListSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * AuthorizedApplications_List.json + */ + /** + * Sample code: AuthorizedApplications_List. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void authorizedApplicationsList(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.authorizedApplications().list("Microsoft.Contoso", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsCreateOrUpdateSamples.java index bf8c825c0d9a..f9494cb606c6 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsCreateOrUpdateSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsCreateOrUpdateSamples.java @@ -6,6 +6,7 @@ import com.azure.resourcemanager.providerhub.models.CustomRolloutProperties; import com.azure.resourcemanager.providerhub.models.CustomRolloutPropertiesSpecification; +import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationAutoProvisionConfig; import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationCanary; import java.util.Arrays; @@ -14,7 +15,7 @@ */ public final class CustomRolloutsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * CustomRollouts_CreateOrUpdate.json */ /** @@ -27,7 +28,10 @@ public static void customRolloutsCreateOrUpdate(com.azure.resourcemanager.provid .define("brazilUsShoeBoxTesting") .withExistingProviderRegistration("Microsoft.Contoso") .withProperties(new CustomRolloutProperties().withSpecification(new CustomRolloutPropertiesSpecification() - .withCanary(new CustomRolloutSpecificationCanary().withRegions(Arrays.asList("brazilus"))))) + .withAutoProvisionConfig( + new CustomRolloutSpecificationAutoProvisionConfig().withStorage(true).withResourceGraph(true)) + .withCanary(new CustomRolloutSpecificationCanary().withRegions(Arrays.asList("brazilus"))) + .withRefreshSubscriptionRegistration(true))) .create(); } } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsDeleteSamples.java new file mode 100644 index 000000000000..508bee23d7cd --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for CustomRollouts Delete. + */ +public final class CustomRolloutsDeleteSamples { + /* + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Delete + * .json + */ + /** + * Sample code: providerReleases_Delete. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerReleasesDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.customRollouts() + .deleteByResourceGroupWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsGetSamples.java index e6fa9ac29a4b..633d61ae5c9a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsGetSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsGetSamples.java @@ -10,7 +10,7 @@ public final class CustomRolloutsGetSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CustomRollouts_Get. + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Get. * json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsListByProviderRegistrationSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsListByProviderRegistrationSamples.java index a23c6ce24343..c8edfc96af6d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsListByProviderRegistrationSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsListByProviderRegistrationSamples.java @@ -9,7 +9,7 @@ */ public final class CustomRolloutsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * CustomRollouts_ListByProviderRegistration.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsStopSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsStopSamples.java new file mode 100644 index 000000000000..124afc2d77d8 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutsStopSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for CustomRollouts Stop. + */ +public final class CustomRolloutsStopSamples { + /* + * x-ms-original-file: + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CustomRollouts_Stop. + * json + */ + /** + * Sample code: CustomRollouts_Stop. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void customRolloutsStop(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.customRollouts().stopWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsCreateOrUpdateSamples.java index f3b4a721f048..6bdd421cb245 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsCreateOrUpdateSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsCreateOrUpdateSamples.java @@ -7,6 +7,7 @@ import com.azure.resourcemanager.providerhub.models.DefaultRolloutProperties; import com.azure.resourcemanager.providerhub.models.DefaultRolloutPropertiesSpecification; import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationCanary; +import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationExpeditedRollout; import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo; import java.time.Duration; import java.util.Arrays; @@ -16,7 +17,7 @@ */ public final class DefaultRolloutsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * DefaultRollouts_CreateOrUpdate.json */ /** @@ -30,6 +31,7 @@ public static void defaultRolloutsCreateOrUpdate(com.azure.resourcemanager.provi .withExistingProviderRegistration("Microsoft.Contoso") .withProperties( new DefaultRolloutProperties().withSpecification(new DefaultRolloutPropertiesSpecification() + .withExpeditedRollout(new DefaultRolloutSpecificationExpeditedRollout().withEnabled(true)) .withCanary(new DefaultRolloutSpecificationCanary().withSkipRegions(Arrays.asList("eastus2euap"))) .withRestOfTheWorldGroupTwo(new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() .withWaitDuration(Duration.parse("PT4H"))))) diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteSamples.java index 8e0bb446e37b..3202a4eb41f5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DefaultRolloutsDeleteSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * DefaultRollouts_Delete.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsGetSamples.java index f92df3f75691..50d040dfa510 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsGetSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsGetSamples.java @@ -10,7 +10,7 @@ public final class DefaultRolloutsGetSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Get. + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Get. * json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsListByProviderRegistrationSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsListByProviderRegistrationSamples.java index 92ac68464aaa..263542587df7 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsListByProviderRegistrationSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsListByProviderRegistrationSamples.java @@ -9,7 +9,7 @@ */ public final class DefaultRolloutsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * DefaultRollouts_ListByProviderRegistration.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopSamples.java index d2bf7ac62a69..6fa8c2eca9fe 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopSamples.java @@ -10,7 +10,7 @@ public final class DefaultRolloutsStopSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/DefaultRollouts_Stop. + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/DefaultRollouts_Stop. * json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9dd06f716469 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseCreateOrUpdateSamples.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +import com.azure.resourcemanager.providerhub.models.AvailableCheckInManifestEnvironment; +import com.azure.resourcemanager.providerhub.models.EndpointType; +import com.azure.resourcemanager.providerhub.models.FrontloadPayload; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadProperties; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideEndpointLevelFields; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideManifestLevelFields; +import com.azure.resourcemanager.providerhub.models.ResourceHydrationAccount; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseFeaturesRule; +import com.azure.resourcemanager.providerhub.models.ServiceFeatureFlagAction; +import java.time.Duration; +import java.util.Arrays; + +/** + * Samples for NewRegionFrontloadRelease CreateOrUpdate. + */ +public final class NewRegionFrontloadReleaseCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_CreateOrUpdate.json + */ + /** + * Sample code: NewRegionFrontloadRelease_CreateOrUpdate. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + newRegionFrontloadReleaseCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .createOrUpdateWithResponse("Microsoft.Contoso", "2020week10", + new FrontloadPayload().withProperties(new FrontloadPayloadProperties().withOperationType("Rollout") + .withProviderNamespace("Microsoft.Contoso") + .withFrontloadLocation("Israel Central") + .withCopyFromLocation("eastus") + .withEnvironmentType(AvailableCheckInManifestEnvironment.PROD) + .withServiceFeatureFlag(ServiceFeatureFlagAction.DO_NOT_CREATE) + .withIncludeResourceTypes(Arrays.asList("servers")) + .withExcludeResourceTypes(Arrays.asList("monitors")) + .withOverrideManifestLevelFields( + new FrontloadPayloadPropertiesOverrideManifestLevelFields().withResourceHydrationAccounts( + Arrays.asList(new ResourceHydrationAccount().withAccountName("classichydrationprodsn01") + .withSubscriptionId("e4eae963-2d15-43e6-a097-98bd75b33edd")))) + .withOverrideEndpointLevelFields( + new FrontloadPayloadPropertiesOverrideEndpointLevelFields().withEnabled(true) + .withApiVersions(Arrays.asList("2024-04-01-preview")) + .withEndpointUri("https://resource-endpoint.com/") + .withLocations(Arrays.asList("East US")) + .withRequiredFeatures(Arrays.asList("")) + .withFeaturesRule(new ResourceTypeEndpointBaseFeaturesRule()) + .withTimeout(Duration.parse("PT20S")) + .withEndpointType(EndpointType.PRODUCTION) + .withDstsConfiguration( + new ResourceTypeEndpointBaseDstsConfiguration().withServiceName("resourceprovider") + .withServiceDnsName("messaging.azure-ppe.net")) + .withSkuLink("http://endpointuri/westus/skus") + .withApiVersion("2024-04-01-preview") + .withZones(Arrays.asList("zone1"))) + .withIgnoreFields(Arrays.asList("apiversion"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGenerateManifestSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGenerateManifestSamples.java new file mode 100644 index 000000000000..a05d1076b510 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGenerateManifestSamples.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +import com.azure.resourcemanager.providerhub.models.AvailableCheckInManifestEnvironment; +import com.azure.resourcemanager.providerhub.models.EndpointType; +import com.azure.resourcemanager.providerhub.models.FrontloadPayload; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadProperties; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideEndpointLevelFields; +import com.azure.resourcemanager.providerhub.models.FrontloadPayloadPropertiesOverrideManifestLevelFields; +import com.azure.resourcemanager.providerhub.models.ResourceHydrationAccount; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointBaseFeaturesRule; +import com.azure.resourcemanager.providerhub.models.ServiceFeatureFlagAction; +import java.time.Duration; +import java.util.Arrays; + +/** + * Samples for NewRegionFrontloadRelease GenerateManifest. + */ +public final class NewRegionFrontloadReleaseGenerateManifestSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_GenerateManifest.json + */ + /** + * Sample code: NewRegionFrontloadRelease_GenerateManifest. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + newRegionFrontloadReleaseGenerateManifest(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .generateManifestWithResponse("Microsoft.Contoso", + new FrontloadPayload().withProperties(new FrontloadPayloadProperties().withOperationType("Rollout") + .withProviderNamespace("Microsoft.Contoso") + .withFrontloadLocation("Israel Central") + .withCopyFromLocation("eastus") + .withEnvironmentType(AvailableCheckInManifestEnvironment.PROD) + .withServiceFeatureFlag(ServiceFeatureFlagAction.DO_NOT_CREATE) + .withIncludeResourceTypes(Arrays.asList("servers")) + .withExcludeResourceTypes(Arrays.asList("monitors")) + .withOverrideManifestLevelFields( + new FrontloadPayloadPropertiesOverrideManifestLevelFields().withResourceHydrationAccounts( + Arrays.asList(new ResourceHydrationAccount().withAccountName("classichydrationprodsn01") + .withSubscriptionId("e4eae963-2d15-43e6-a097-98bd75b33edd")))) + .withOverrideEndpointLevelFields( + new FrontloadPayloadPropertiesOverrideEndpointLevelFields().withEnabled(true) + .withApiVersions(Arrays.asList("2024-04-01-preview")) + .withEndpointUri("https://resource-endpoint.com/") + .withLocations(Arrays.asList("East US")) + .withRequiredFeatures(Arrays.asList("")) + .withFeaturesRule(new ResourceTypeEndpointBaseFeaturesRule()) + .withTimeout(Duration.parse("PT20S")) + .withEndpointType(EndpointType.PRODUCTION) + .withDstsConfiguration( + new ResourceTypeEndpointBaseDstsConfiguration().withServiceName("resourceprovider") + .withServiceDnsName("messaging.azure-ppe.net")) + .withSkuLink("http://endpointuri/westus/skus") + .withApiVersion("2024-04-01-preview") + .withZones(Arrays.asList("zone1"))) + .withIgnoreFields(Arrays.asList("apiversion"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGetSamples.java new file mode 100644 index 000000000000..cc213f2a498c --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for NewRegionFrontloadRelease Get. + */ +public final class NewRegionFrontloadReleaseGetSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_Get.json + */ + /** + * Sample code: NewRegionFrontloadRelease_Get. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void newRegionFrontloadReleaseGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .getWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseStopSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseStopSamples.java new file mode 100644 index 000000000000..096a2e005c6b --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NewRegionFrontloadReleaseStopSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for NewRegionFrontloadRelease Stop. + */ +public final class NewRegionFrontloadReleaseStopSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * NewRegionFrontloadRelease_Stop.json + */ + /** + * Sample code: NewRegionFrontloadRelease_Stop. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void newRegionFrontloadReleaseStop(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.newRegionFrontloadReleases() + .stopWithResponse("Microsoft.Contoso", "2020week10", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateSamples.java index a2b571fc1205..481ebbdbc549 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class NotificationRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * NotificationRegistrations_CreateOrUpdate.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteSamples.java index 6c660c3e041f..02a7110007d9 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class NotificationRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * NotificationRegistrations_Delete.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetSamples.java index 74942ffd2da7..23416ffd77cf 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class NotificationRegistrationsGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * NotificationRegistrations_Get.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationSamples.java index 40b0ee8e5296..73cdc4843d85 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationSamples.java @@ -9,7 +9,7 @@ */ public final class NotificationRegistrationsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * NotificationRegistrations_ListByProviderRegistration.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateSamples.java index d6f005cad701..b4a022024bf4 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateSamples.java @@ -4,9 +4,14 @@ package com.azure.resourcemanager.providerhub.generated; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import com.azure.resourcemanager.providerhub.models.OperationsPutContent; +import com.azure.resourcemanager.providerhub.fluent.models.OperationsPutContentInner; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDefinition; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDefinitionDisplay; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDisplayDefinitionDefault; +import com.azure.resourcemanager.providerhub.models.LocalizedOperationDisplayDefinitionEn; +import com.azure.resourcemanager.providerhub.models.OperationActionType; +import com.azure.resourcemanager.providerhub.models.OperationOrigins; +import com.azure.resourcemanager.providerhub.models.OperationsPutContentProperties; import java.util.Arrays; /** @@ -14,7 +19,7 @@ */ public final class OperationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Operations_CreateOrUpdate.json */ /** @@ -24,13 +29,31 @@ public final class OperationsCreateOrUpdateSamples { */ public static void operationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { manager.operations() - .createOrUpdateWithResponse("Microsoft.Contoso", - new OperationsPutContent().withContents( - Arrays.asList(new OperationsDefinitionInner().withName("Microsoft.Contoso/Employees/Read") - .withDisplay(new OperationsDefinitionDisplay().withProvider("Microsoft.Contoso") - .withResource("Employees") - .withOperation("Gets/List employee resources") - .withDescription("Read employees")))), + .createOrUpdateWithResponse("Microsoft.Contoso", new OperationsPutContentInner().withProperties( + new OperationsPutContentProperties().withContents(Arrays.asList(new LocalizedOperationDefinition() + .withName("RP.69C09791/register/action") + .withIsDataAction(true) + .withDisplay(new LocalizedOperationDefinitionDisplay().withDefaultProperty( + new LocalizedOperationDisplayDefinitionDefault().withProvider("RP.69C09791") + .withResource("Register") + .withOperation("Registers the RP.69C09791 Resource Provider") + .withDescription( + "Registers the subscription for the RP.69C09791 resource provider and enables the creation of RP.69C09791."))) + .withActionType(OperationActionType.INTERNAL), + new LocalizedOperationDefinition().withName("RP.69C09791/unregister/action") + .withIsDataAction(false) + .withOrigin(OperationOrigins.SYSTEM) + .withDisplay(new LocalizedOperationDefinitionDisplay() + .withDefaultProperty(new LocalizedOperationDisplayDefinitionDefault() + .withProvider("RP.69C09791") + .withResource("Unregister") + .withOperation("Unregisters the RP.69C09791 Resource Provider") + .withDescription( + "Unregisters the subscription for the RP.69C09791 resource provider and enables the creation of RP.69C09791.")) + .withEn(new LocalizedOperationDisplayDefinitionEn().withProvider("RP.69C09791") + .withResource("2e1803d4-417f-492c-b305-148da38b211e") + .withOperation("d31623d6-8765-42fb-aca2-5a58303e52dd") + .withDescription("ece249f5-b5b9-492d-ac68-b4e1be1677bc")))))), com.azure.core.util.Context.NONE); } } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteSamples.java index 1345821ffb25..ad9539d0df1e 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteSamples.java @@ -10,7 +10,7 @@ public final class OperationsDeleteSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Operations_Delete. + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Operations_Delete. * json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationSamples.java index 4204562f05cd..4fc07c33b304 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Operations_ListByProviderRegistration.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListSamples.java index 46b668668c12..81ffe61cafa5 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Operations_List.json + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsCreateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsCreateSamples.java new file mode 100644 index 000000000000..ff2a12766cd9 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsCreateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for ProviderMonitorSettings Create. + */ +public final class ProviderMonitorSettingsCreateSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Create.json + */ + /** + * Sample code: ProviderMonitorSettings_Create. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerMonitorSettingsCreate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .define("ContosoMonitorSetting") + .withRegion("eastus") + .withExistingResourceGroup("default") + .create(); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsDeleteSamples.java new file mode 100644 index 000000000000..05e0001c407a --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for ProviderMonitorSettings Delete. + */ +public final class ProviderMonitorSettingsDeleteSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Delete.json + */ + /** + * Sample code: ProviderMonitorSettings_Delete. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerMonitorSettingsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .deleteByResourceGroupWithResponse("default", "ContosoMonitorSetting", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsGetByResourceGroupSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..32bd8803cb55 --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for ProviderMonitorSettings GetByResourceGroup. + */ +public final class ProviderMonitorSettingsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Get.json + */ + /** + * Sample code: ProviderMonitorSettings_Get. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerMonitorSettingsGet(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .getByResourceGroupWithResponse("default", "ContosoMonitorSetting", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListByResourceGroupSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListByResourceGroupSamples.java new file mode 100644 index 000000000000..29a1c3cf9c7d --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for ProviderMonitorSettings ListByResourceGroup. + */ +public final class ProviderMonitorSettingsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_ListByResourceGroup.json + */ + /** + * Sample code: ProviderMonitorSettings_ListByResourceGroup. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + providerMonitorSettingsListByResourceGroup(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings().listByResourceGroup("default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListSamples.java new file mode 100644 index 000000000000..265133a1cc5c --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for ProviderMonitorSettings List. + */ +public final class ProviderMonitorSettingsListSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_ListBySubscription.json + */ + /** + * Sample code: ProviderMonitorSettings_ListBySubscription. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + providerMonitorSettingsListBySubscription(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsUpdateSamples.java new file mode 100644 index 000000000000..449ea42781be --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderMonitorSettingsUpdateSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +/** + * Samples for ProviderMonitorSettings Update. + */ +public final class ProviderMonitorSettingsUpdateSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderMonitorSettings_Update.json + */ + /** + * Sample code: ProviderMonitorSettings_Update. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void providerMonitorSettingsUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerMonitorSettings() + .updateWithResponse("default", "ContosoMonitorSetting", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsCreateOrUpdateSamples.java index 99ad6294d4e4..6560dad674b3 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsCreateOrUpdateSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsCreateOrUpdateSamples.java @@ -5,11 +5,34 @@ package com.azure.resourcemanager.providerhub.generated; import com.azure.resourcemanager.providerhub.fluent.models.ProviderRegistrationInner; +import com.azure.resourcemanager.providerhub.models.BlockActionVerb; +import com.azure.resourcemanager.providerhub.models.CrossTenantTokenValidation; +import com.azure.resourcemanager.providerhub.models.EndpointInformation; +import com.azure.resourcemanager.providerhub.models.ExpeditedRolloutIntent; +import com.azure.resourcemanager.providerhub.models.FilterRule; +import com.azure.resourcemanager.providerhub.models.NotificationEndpointType; +import com.azure.resourcemanager.providerhub.models.NotificationOptions; +import com.azure.resourcemanager.providerhub.models.ProviderRegistrationKind; import com.azure.resourcemanager.providerhub.models.ProviderRegistrationProperties; +import com.azure.resourcemanager.providerhub.models.Readiness; +import com.azure.resourcemanager.providerhub.models.ResourceHydrationAccount; import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilities; import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilitiesEffect; +import com.azure.resourcemanager.providerhub.models.ResourceProviderEndpoint; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesDstsConfiguration; import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesManagement; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesNotificationSettings; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove; +import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesResponseOptions; +import com.azure.resourcemanager.providerhub.models.ResourceProviderService; import com.azure.resourcemanager.providerhub.models.ResourceProviderType; +import com.azure.resourcemanager.providerhub.models.ServerFailureResponseMessageType; +import com.azure.resourcemanager.providerhub.models.ServiceClientOptionsType; +import com.azure.resourcemanager.providerhub.models.ServiceStatus; +import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; +import com.azure.resourcemanager.providerhub.models.SubscriberSetting; import java.util.Arrays; /** @@ -17,30 +40,116 @@ */ public final class ProviderRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ - * ProviderRegistrations_CreateOrUpdate.json + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * DirectProviderRegistrations_CreateOrUpdate.json */ /** - * Sample code: ProviderRegistrations_CreateOrUpdate. + * Sample code: DirectProviderRegistrations_CreateOrUpdate. * * @param manager Entry point to ProviderHubManager. */ public static void - providerRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + directProviderRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { manager.providerRegistrations() .createOrUpdate("Microsoft.Contoso", new ProviderRegistrationInner() - .withProperties(new ProviderRegistrationProperties().withProviderVersion("2.0") + .withProperties(new ProviderRegistrationProperties() + .withServices(Arrays.asList( + new ResourceProviderService().withServiceName("tags").withStatus(ServiceStatus.INACTIVE))) + .withServiceName("root") + .withProviderVersion("2.0") .withProviderType(ResourceProviderType.INTERNAL) .withManagement(new ResourceProviderManifestPropertiesManagement() .withIncidentRoutingService("Contoso Resource Provider") .withIncidentRoutingTeam("Contoso Triage") - .withIncidentContactEmail("helpme@contoso.com")) + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos(Arrays + .asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT)))) .withCapabilities(Arrays.asList( new ResourceProviderCapabilities().withQuotaId("CSP_2015-05-01") .withEffect(ResourceProviderCapabilitiesEffect.ALLOW), new ResourceProviderCapabilities().withQuotaId("CSP_MG_2017-12-01") - .withEffect(ResourceProviderCapabilitiesEffect.ALLOW)))), + .withEffect(ResourceProviderCapabilitiesEffect.ALLOW))) + .withDstsConfiguration( + new ResourceProviderManifestPropertiesDstsConfiguration().withServiceName("prds-shim") + .withServiceDnsName("prds.sparta.azure.com")) + .withNotificationOptions(NotificationOptions.EMIT_SPENDING_LIMIT) + .withResourceHydrationAccounts(Arrays + .asList(new ResourceHydrationAccount().withAccountName("classichydrationprodsn01") + .withSubscriptionId("e4eae963-2d15-43e6-a097-98bd75b33edd"), + new ResourceHydrationAccount() + .withAccountName("classichydrationprodch01") + .withSubscriptionId("69e69ecb-e69c-41d4-99b8-87dd12781067"))) + .withNotificationSettings(new ResourceProviderManifestPropertiesNotificationSettings() + .withSubscriberSettings(Arrays.asList( + new SubscriberSetting().withFilterRules(Arrays.asList(new FilterRule().withFilterQuery( + "Resources | where event.eventType in ('Microsoft.Network/IpAddresses/write', 'Microsoft.KeyVault/vaults/move/action')") + .withEndpointInformation(Arrays.asList( + new EndpointInformation().withEndpoint("https://userrp.azure.com/arnnotify") + .withEndpointType(NotificationEndpointType.WEBHOOK) + .withSchemaVersion("3.0"), + new EndpointInformation().withEndpoint("https://userrp.azure.com/arnnotify") + .withEndpointType(NotificationEndpointType.EVENTHUB) + .withSchemaVersion("3.0")))))))) + .withManagementGroupGlobalNotificationEndpoints(Arrays.asList(new ResourceProviderEndpoint() + .withEndpointUri("{your_management_group_notification_endpoint}"))) + .withOptionalFeatures(Arrays.asList("Microsoft.Resources/PlatformSubscription")) + .withResourceGroupLockOptionDuringMove( + new ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove() + .withBlockActionVerb(BlockActionVerb.ACTION)) + .withResponseOptions(new ResourceProviderManifestPropertiesResponseOptions() + .withServiceClientOptionsType(ServiceClientOptionsType.DISABLE_AUTOMATIC_DECOMPRESSION)) + .withLegacyNamespace("legacyNamespace") + .withLegacyRegistrations(Arrays.asList("legacyRegistration")) + .withCustomManifestVersion("2.0")) + .withKind(ProviderRegistrationKind.DIRECT), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ProviderRegistrations_CreateOrUpdate.json + */ + /** + * Sample code: ProviderRegistrations_CreateOrUpdate. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + providerRegistrationsCreateOrUpdate(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.providerRegistrations() + .createOrUpdate("Microsoft.Contoso", + new ProviderRegistrationInner().withProperties(new ProviderRegistrationProperties() + .withServices(Arrays.asList( + new ResourceProviderService().withServiceName("tags").withStatus(ServiceStatus.INACTIVE))) + .withServiceName("root") + .withProviderVersion("2.0") + .withProviderType(ResourceProviderType.INTERNAL) + .withManagement(new ResourceProviderManifestPropertiesManagement() + .withIncidentRoutingService("Contoso Resource Provider") + .withIncidentRoutingTeam("Contoso Triage") + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos( + Arrays.asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT))) + .withExpeditedRolloutSubmitters(Arrays.asList("SPARTA-PlatformServiceOperator")) + .withErrorResponseMessageOptions(new ResourceProviderManagementErrorResponseMessageOptions() + .withServerFailureResponseMessageType(ServerFailureResponseMessageType.OUTAGE_REPORTING)) + .withExpeditedRolloutMetadata( + new ResourceProviderManagementExpeditedRolloutMetadata().withEnabled(false) + .withExpeditedRolloutIntent(ExpeditedRolloutIntent.HOTFIX)) + .withCanaryManifestOwners(Arrays.asList("SPARTA-PlatformServiceAdmin")) + .withPcCode("fakeTokenPlaceholder") + .withProfitCenterProgramId("1234")) + .withCapabilities(Arrays.asList( + new ResourceProviderCapabilities().withQuotaId("CSP_2015-05-01") + .withEffect(ResourceProviderCapabilitiesEffect.ALLOW), + new ResourceProviderCapabilities().withQuotaId("CSP_MG_2017-12-01") + .withEffect(ResourceProviderCapabilitiesEffect.ALLOW))) + .withCrossTenantTokenValidation(CrossTenantTokenValidation.ENSURE_SECURE_VALIDATION)), com.azure.core.util.Context.NONE); } } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteSamples.java index 70e3e58dd4b9..97fa4d5507a2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ProviderRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ProviderRegistrations_Delete.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsSamples.java index 2473d7973bc3..a46becff0260 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsSamples.java @@ -9,7 +9,7 @@ */ public final class ProviderRegistrationsGenerateOperationsSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ProviderRegistrations_GenerateOperations.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGetSamples.java index e8cef4ca406d..d57c0c81d3dd 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGetSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ProviderRegistrationsGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ProviderRegistrations_Get.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsListSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsListSamples.java index 53dad47f4d72..c4f2a588f5d2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsListSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsListSamples.java @@ -9,7 +9,7 @@ */ public final class ProviderRegistrationsListSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ProviderRegistrations_List.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceActionsDeleteResourcesSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceActionsDeleteResourcesSamples.java new file mode 100644 index 000000000000..93462ee0cdad --- /dev/null +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceActionsDeleteResourcesSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.providerhub.generated; + +import com.azure.resourcemanager.providerhub.models.ResourceManagementAction; +import com.azure.resourcemanager.providerhub.models.ResourceManagementEntity; +import java.util.Arrays; + +/** + * Samples for ResourceActions DeleteResources. + */ +public final class ResourceActionsDeleteResourcesSamples { + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * ResourceActions_DeleteResources.json + */ + /** + * Sample code: ResourceActions_DeleteResources. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void + resourceActionsDeleteResources(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceActions() + .deleteResources("Microsoft.Contoso", "default", + new ResourceManagementAction().withResources(Arrays.asList(new ResourceManagementEntity() + .withResourceId( + "/subscriptions/ab7a8701-f7ef-471a-a2f4-d0ebbf494f77/providers/Microsoft.Contoso/employee/test") + .withHomeTenantId("11111111-f7ef-471a-a2f4-d0ebbf494f77") + .withLocation("southeastasia"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCheckinManifestSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCheckinManifestSamples.java index 90d97390d5ad..7f94bb221ff2 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCheckinManifestSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCheckinManifestSamples.java @@ -12,7 +12,7 @@ public final class ResourceProviderCheckinManifestSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/CheckinManifest.json + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/CheckinManifest.json */ /** * Sample code: CheckinManifest. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderGenerateManifestSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderGenerateManifestSamples.java index 8121ee701bca..bb2a66a629b9 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderGenerateManifestSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderGenerateManifestSamples.java @@ -10,7 +10,7 @@ public final class ResourceProviderGenerateManifestSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/GenerateManifest.json + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/GenerateManifest.json */ /** * Sample code: GenerateManifest. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsCreateOrUpdateSamples.java index 6a91960e300f..a178c328d312 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsCreateOrUpdateSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsCreateOrUpdateSamples.java @@ -4,19 +4,67 @@ package com.azure.resourcemanager.providerhub.generated; +import com.azure.resourcemanager.providerhub.models.AdditionalOptionsResourceTypeRegistration; +import com.azure.resourcemanager.providerhub.models.AllowedResourceName; +import com.azure.resourcemanager.providerhub.models.ApiProfile; +import com.azure.resourcemanager.providerhub.models.AsyncTimeoutRule; +import com.azure.resourcemanager.providerhub.models.AvailabilityZonePolicy; +import com.azure.resourcemanager.providerhub.models.CapacityPolicy; +import com.azure.resourcemanager.providerhub.models.CommonApiVersionsMergeMode; +import com.azure.resourcemanager.providerhub.models.CrossTenantTokenValidation; +import com.azure.resourcemanager.providerhub.models.DeleteDependency; +import com.azure.resourcemanager.providerhub.models.FilterOption; +import com.azure.resourcemanager.providerhub.models.LegacyDisallowedCondition; +import com.azure.resourcemanager.providerhub.models.LegacyOperation; +import com.azure.resourcemanager.providerhub.models.LinkedAction; +import com.azure.resourcemanager.providerhub.models.LinkedOperation; +import com.azure.resourcemanager.providerhub.models.LinkedOperationRule; +import com.azure.resourcemanager.providerhub.models.Notification; +import com.azure.resourcemanager.providerhub.models.NotificationType; +import com.azure.resourcemanager.providerhub.models.OpenApiConfiguration; +import com.azure.resourcemanager.providerhub.models.OpenApiValidation; +import com.azure.resourcemanager.providerhub.models.OptOutHeaderType; +import com.azure.resourcemanager.providerhub.models.Policy; +import com.azure.resourcemanager.providerhub.models.PolicyExecutionType; +import com.azure.resourcemanager.providerhub.models.Readiness; import com.azure.resourcemanager.providerhub.models.Regionality; +import com.azure.resourcemanager.providerhub.models.ResourceAccessPolicy; +import com.azure.resourcemanager.providerhub.models.ResourceConcurrencyControlOption; import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpoint; import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationProperties; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesCapacityRule; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesDstsConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesLegacyPolicy; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesManagement; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesMarketplaceOptions; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesRequestHeaderOptions; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceCache; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptions; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceQueryManagement; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesRoutingRule; +import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy; import com.azure.resourcemanager.providerhub.models.RoutingType; +import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; +import com.azure.resourcemanager.providerhub.models.SkipNotifications; +import com.azure.resourcemanager.providerhub.models.SupportedOperations; import com.azure.resourcemanager.providerhub.models.SwaggerSpecification; +import com.azure.resourcemanager.providerhub.models.TemplateDeploymentCapabilities; +import com.azure.resourcemanager.providerhub.models.TemplateDeploymentPreflightNotifications; +import com.azure.resourcemanager.providerhub.models.TemplateDeploymentPreflightOptions; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for ResourceTypeRegistrations CreateOrUpdate. */ public final class ResourceTypeRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ResourceTypeRegistrations_CreateOrUpdate.json */ /** @@ -30,6 +78,7 @@ public final class ResourceTypeRegistrationsCreateOrUpdateSamples { .define("employees") .withExistingProviderRegistration("Microsoft.Contoso") .withProperties(new ResourceTypeRegistrationProperties().withRoutingType(RoutingType.DEFAULT) + .withCrossTenantTokenValidation(CrossTenantTokenValidation.ENSURE_SECURE_VALIDATION) .withRegionality(Regionality.REGIONAL) .withEndpoints( Arrays.asList(new ResourceTypeEndpoint().withApiVersions(Arrays.asList("2020-06-01-preview")) @@ -38,7 +87,158 @@ public final class ResourceTypeRegistrationsCreateOrUpdateSamples { .withSwaggerSpecifications(Arrays.asList(new SwaggerSpecification() .withApiVersions(Arrays.asList("2020-06-01-preview")) .withSwaggerSpecFolderUri( - "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/")))) + "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"))) + .withRequestHeaderOptions(new ResourceTypeRegistrationPropertiesRequestHeaderOptions() + .withOptOutHeaders(OptOutHeaderType.SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY)) + .withResourceConcurrencyControlOptions(mapOf("patch", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "post", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "put", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION))) + .withResourceGraphConfiguration( + new ResourceTypeRegistrationPropertiesResourceGraphConfiguration().withEnabled(true) + .withApiVersion("2019-01-01")) + .withManagement(new ResourceTypeRegistrationPropertiesManagement() + .withManifestOwners(Arrays.asList("SPARTA-PlatformServiceAdministrator")) + .withAuthorizationOwners(Arrays.asList("RPAAS-PlatformServiceAdministrator")) + .withIncidentRoutingService("") + .withIncidentRoutingTeam("") + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos( + Arrays.asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT))) + .withResourceAccessPolicy(ResourceAccessPolicy.NOT_SPECIFIED)) + .withOpenApiConfiguration(new OpenApiConfiguration() + .withValidation(new OpenApiValidation().withAllowNoncompliantCollectionResponse(true))) + .withMetadata(mapOf()) + .withNotifications( + Arrays.asList(new Notification().withNotificationType(NotificationType.SUBSCRIPTION_NOTIFICATION) + .withSkipNotifications(SkipNotifications.DISABLED)))) .create(); } + + /* + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ + * DirectResourceTypeRegistrations_CreateOrUpdate.json + */ + /** + * Sample code: DirectResourceTypeRegistrations_CreateOrUpdate.json. + * + * @param manager Entry point to ProviderHubManager. + */ + public static void directResourceTypeRegistrationsCreateOrUpdateJson( + com.azure.resourcemanager.providerhub.ProviderHubManager manager) { + manager.resourceTypeRegistrations() + .define("employees") + .withExistingProviderRegistration("Microsoft.Contoso") + .withProperties(new ResourceTypeRegistrationProperties().withRoutingType(RoutingType.DEFAULT) + .withAdditionalOptions(AdditionalOptionsResourceTypeRegistration.PROTECTED_ASYNC_OPERATION_POLLING) + .withRegionality(Regionality.REGIONAL) + .withEndpoints( + Arrays.asList(new ResourceTypeEndpoint().withApiVersions(Arrays.asList("2020-06-01-preview")) + .withLocations(Arrays.asList("West US", "East US", "North Europe")) + .withRequiredFeatures(Arrays.asList("")))) + .withSwaggerSpecifications(Arrays.asList(new SwaggerSpecification() + .withApiVersions(Arrays.asList("2020-06-01-preview")) + .withSwaggerSpecFolderUri( + "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/"))) + .withRequestHeaderOptions(new ResourceTypeRegistrationPropertiesRequestHeaderOptions() + .withOptOutHeaders(OptOutHeaderType.SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY)) + .withResourceConcurrencyControlOptions(mapOf("patch", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "post", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION), "put", + new ResourceConcurrencyControlOption().withPolicy(Policy.SYNCHRONIZE_BEGIN_EXTENSION))) + .withResourceGraphConfiguration( + new ResourceTypeRegistrationPropertiesResourceGraphConfiguration().withEnabled(true) + .withApiVersion("2019-01-01")) + .withManagement(new ResourceTypeRegistrationPropertiesManagement() + .withManifestOwners(Arrays.asList("SPARTA-PlatformServiceAdministrator")) + .withAuthorizationOwners(Arrays.asList("RPAAS-PlatformServiceAdministrator")) + .withIncidentRoutingService("") + .withIncidentRoutingTeam("") + .withIncidentContactEmail("helpme@contoso.com") + .withServiceTreeInfos( + Arrays.asList(new ServiceTreeInfo().withServiceId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withComponentId("d1b7d8ba-05e2-48e6-90d6-d781b99c6e69") + .withReadiness(Readiness.IN_DEVELOPMENT))) + .withResourceAccessPolicy(ResourceAccessPolicy.NOT_SPECIFIED)) + .withOpenApiConfiguration(new OpenApiConfiguration() + .withValidation(new OpenApiValidation().withAllowNoncompliantCollectionResponse(true))) + .withMetadata(mapOf()) + .withNotifications( + Arrays.asList(new Notification().withNotificationType(NotificationType.SUBSCRIPTION_NOTIFICATION) + .withSkipNotifications(SkipNotifications.DISABLED))) + .withTemplateDeploymentPolicy(new ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy() + .withCapabilities(TemplateDeploymentCapabilities.PREFLIGHT) + .withPreflightOptions( + TemplateDeploymentPreflightOptions.fromString("ValidationRequests, DeploymentRequests")) + .withPreflightNotifications(TemplateDeploymentPreflightNotifications.NONE)) + .withAllowEmptyRoleAssignments(false) + .withPolicyExecutionType(PolicyExecutionType.BYPASS_POLICIES) + .withAvailabilityZoneRule(new ResourceTypeRegistrationPropertiesAvailabilityZoneRule() + .withAvailabilityZonePolicy(AvailabilityZonePolicy.MULTI_ZONED)) + .withDstsConfiguration( + new ResourceTypeRegistrationPropertiesDstsConfiguration().withServiceName("prds-shim") + .withServiceDnsName("prds.sparta.azure.com")) + .withAsyncTimeoutRules( + Arrays.asList(new AsyncTimeoutRule().withActionName("Microsoft.ClassicCompute/domainNames/write") + .withTimeout("PT12H"))) + .withCommonApiVersions(Arrays.asList("2021-01-01")) + .withApiProfiles( + Arrays.asList(new ApiProfile().withProfileVersion("2018-03-01-hybrid").withApiVersion("2018-02-01"), + new ApiProfile().withProfileVersion("2019-03-01-hybrid").withApiVersion("2016-06-01"))) + .withLinkedOperationRules(Arrays.asList( + new LinkedOperationRule().withLinkedOperation(LinkedOperation.CROSS_SUBSCRIPTION_RESOURCE_MOVE) + .withLinkedAction(LinkedAction.BLOCKED), + new LinkedOperationRule().withLinkedOperation(LinkedOperation.CROSS_RESOURCE_GROUP_RESOURCE_MOVE) + .withLinkedAction(LinkedAction.VALIDATE))) + .withLegacyName("legacyName") + .withLegacyNames(Arrays.asList("legacyName")) + .withAllowedTemplateDeploymentReferenceActions(Arrays.asList("ListKeys", "ListSAS")) + .withLegacyPolicy(new ResourceTypeRegistrationPropertiesLegacyPolicy() + .withDisallowedLegacyOperations(Arrays.asList(LegacyOperation.CREATE)) + .withDisallowedConditions(Arrays.asList(new LegacyDisallowedCondition() + .withDisallowedLegacyOperations(Arrays.asList(LegacyOperation.CREATE, LegacyOperation.DELETE)) + .withFeature("Microsoft.RP/ArmOnlyJobCollections")))) + .withManifestLink("https://azure.com") + .withCapacityRule( + new ResourceTypeRegistrationPropertiesCapacityRule().withCapacityPolicy(CapacityPolicy.RESTRICTED) + .withSkuAlias("incorrectAlias")) + .withMarketplaceOptions( + new ResourceTypeRegistrationPropertiesMarketplaceOptions().withAddOnPlanConversionAllowed(true)) + .withAllowedResourceNames( + Arrays.asList(new AllowedResourceName().withName("name1").withGetActionVerb("list"), + new AllowedResourceName().withName("name2"))) + .withResourceCache(new ResourceTypeRegistrationPropertiesResourceCache().withEnableResourceCache(true) + .withResourceCacheExpirationTimespan("PT2M")) + .withResourceQueryManagement(new ResourceTypeRegistrationPropertiesResourceQueryManagement() + .withFilterOption(FilterOption.ENABLE_SUBSCRIPTION_FILTER_ON_TENANT)) + .withSupportsTags(true) + .withResourceManagementOptions(new ResourceTypeRegistrationPropertiesResourceManagementOptions() + .withBatchProvisioningSupport( + new ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport() + .withSupportedOperations(SupportedOperations.fromString("Get, Delete"))) + .withDeleteDependencies(Arrays + .asList(new DeleteDependency().withLinkedProperty("properties.edgeProfile.subscription.id")))) + .withGroupingTag("groupingTag") + .withAddResourceListTargetLocations(true) + .withResourceTypeCommonAttributeManagement( + new ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement() + .withCommonApiVersionsMergeMode(CommonApiVersionsMergeMode.MERGE)) + .withRoutingRule( + new ResourceTypeRegistrationPropertiesRoutingRule().withHostResourceType("servers/databases"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteSamples.java index bb5b4ae7c80f..ed3b1334cc22 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceTypeRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ResourceTypeRegistrations_Delete.json */ /** @@ -20,7 +20,6 @@ public final class ResourceTypeRegistrationsDeleteSamples { public static void resourceTypeRegistrationsDelete(com.azure.resourcemanager.providerhub.ProviderHubManager manager) { manager.resourceTypeRegistrations() - .deleteByResourceGroupWithResponse("Microsoft.Contoso", "testResourceType", - com.azure.core.util.Context.NONE); + .delete("Microsoft.Contoso", "testResourceType", com.azure.core.util.Context.NONE); } } diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsGetSamples.java index 65998fccb399..6ecfb36890ce 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsGetSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceTypeRegistrationsGetSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ResourceTypeRegistrations_Get.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsListByProviderRegistrationSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsListByProviderRegistrationSamples.java index dd99beaa7a1e..074c93743ebc 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsListByProviderRegistrationSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsListByProviderRegistrationSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceTypeRegistrationsListByProviderRegistrationSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * ResourceTypeRegistrations_ListByProviderRegistration.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstSamples.java index b9aa308f3fef..f2030f06c749 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstSamples.java @@ -15,7 +15,7 @@ */ public final class SkusCreateOrUpdateNestedResourceTypeFirstSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_CreateOrUpdateNestedResourceTypeFirst.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondSamples.java index e5437d4546cd..30491b72928b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondSamples.java @@ -15,7 +15,7 @@ */ public final class SkusCreateOrUpdateNestedResourceTypeSecondSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_CreateOrUpdateNestedResourceTypeSecond.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdSamples.java index 16ea5b193c8c..51203bce8b3a 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdSamples.java @@ -15,7 +15,7 @@ */ public final class SkusCreateOrUpdateNestedResourceTypeThirdSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_CreateOrUpdateNestedResourceTypeThird.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateSamples.java index ab73b032ff86..afdd0c31bcf7 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ public final class SkusCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_CreateOrUpdate. + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_CreateOrUpdate. * json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstSamples.java index 81ba8b76f45e..3ef752ae38b6 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstSamples.java @@ -9,7 +9,7 @@ */ public final class SkusDeleteNestedResourceTypeFirstSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_DeleteNestedResourceTypeFirst.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondSamples.java index b28eb75405be..58a894a5b467 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondSamples.java @@ -9,7 +9,7 @@ */ public final class SkusDeleteNestedResourceTypeSecondSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_DeleteNestedResourceTypeSecond.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdSamples.java index 75e05023e392..1195149aae19 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdSamples.java @@ -9,7 +9,7 @@ */ public final class SkusDeleteNestedResourceTypeThirdSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_DeleteNestedResourceTypeThird.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteSamples.java index 9a766a56bf55..7605fa53810e 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteSamples.java @@ -10,7 +10,7 @@ public final class SkusDeleteSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Delete.json + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Delete.json */ /** * Sample code: Skus_Delete. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstSamples.java index d9a89f1b7149..c0bd75c7b97b 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstSamples.java @@ -9,7 +9,7 @@ */ public final class SkusGetNestedResourceTypeFirstSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_GetNestedResourceTypeFirst.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondSamples.java index 1922071a360d..805bd1ab666f 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondSamples.java @@ -9,7 +9,7 @@ */ public final class SkusGetNestedResourceTypeSecondSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_GetNestedResourceTypeSecond.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdSamples.java index 7dd133e21c41..e7e7aba67a2d 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdSamples.java @@ -9,7 +9,7 @@ */ public final class SkusGetNestedResourceTypeThirdSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_GetNestedResourceTypeThird.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetSamples.java index 1e7acc35c6d9..149b85cf4916 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusGetSamples.java @@ -10,7 +10,7 @@ public final class SkusGetSamples { /* * x-ms-original-file: - * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/Skus_Get.json + * specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/Skus_Get.json */ /** * Sample code: Skus_Get. diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSamples.java index d993e25fbc91..2dd857d41663 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSamples.java @@ -9,7 +9,7 @@ */ public final class SkusListByResourceTypeRegistrationsNestedResourceTypeFirstSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSamples.java index 6860874e5764..36a4e0035ec8 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSamples.java @@ -9,7 +9,7 @@ */ public final class SkusListByResourceTypeRegistrationsNestedResourceTypeSecondSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdSamples.java index 96bb387f8ddf..00319ced2e92 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdSamples.java @@ -9,7 +9,7 @@ */ public final class SkusListByResourceTypeRegistrationsNestedResourceTypeThirdSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_ListByResourceTypeRegistrationsNestedResourceTypeThird.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsSamples.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsSamples.java index 81dbd2d48f66..a29f89736622 100644 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsSamples.java +++ b/sdk/providerhub/azure-resourcemanager-providerhub/src/samples/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsSamples.java @@ -9,7 +9,7 @@ */ public final class SkusListByResourceTypeRegistrationsSamples { /* - * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/examples/ + * x-ms-original-file: specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2024-09-01/examples/ * Skus_ListByResourceTypeRegistrations.json */ /** diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/AuthorizationActionMappingTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/AuthorizationActionMappingTests.java deleted file mode 100644 index 6ef2bf6d20c4..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/AuthorizationActionMappingTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.AuthorizationActionMapping; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizationActionMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizationActionMapping model = BinaryData.fromString("{\"original\":\"jdhtldwkyzxu\",\"desired\":\"kn\"}") - .toObject(AuthorizationActionMapping.class); - Assertions.assertEquals("jdhtldwkyzxu", model.original()); - Assertions.assertEquals("kn", model.desired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizationActionMapping model - = new AuthorizationActionMapping().withOriginal("jdhtldwkyzxu").withDesired("kn"); - model = BinaryData.fromObject(model).toObject(AuthorizationActionMapping.class); - Assertions.assertEquals("jdhtldwkyzxu", model.original()); - Assertions.assertEquals("kn", model.desired()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CanaryTrafficRegionRolloutConfigurationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CanaryTrafficRegionRolloutConfigurationTests.java deleted file mode 100644 index 415620b3f84f..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CanaryTrafficRegionRolloutConfigurationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.CanaryTrafficRegionRolloutConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CanaryTrafficRegionRolloutConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CanaryTrafficRegionRolloutConfiguration model = BinaryData.fromString( - "{\"skipRegions\":[\"tkuwhhmhykojo\",\"afnn\"],\"regions\":[\"ichkoymkcdyhb\",\"kkpwdreqnovvq\",\"ovljxywsu\"]}") - .toObject(CanaryTrafficRegionRolloutConfiguration.class); - Assertions.assertEquals("tkuwhhmhykojo", model.skipRegions().get(0)); - Assertions.assertEquals("ichkoymkcdyhb", model.regions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CanaryTrafficRegionRolloutConfiguration model - = new CanaryTrafficRegionRolloutConfiguration().withSkipRegions(Arrays.asList("tkuwhhmhykojo", "afnn")) - .withRegions(Arrays.asList("ichkoymkcdyhb", "kkpwdreqnovvq", "ovljxywsu")); - model = BinaryData.fromObject(model).toObject(CanaryTrafficRegionRolloutConfiguration.class); - Assertions.assertEquals("tkuwhhmhykojo", model.skipRegions().get(0)); - Assertions.assertEquals("ichkoymkcdyhb", model.regions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckNameAvailabilitySpecificationsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckNameAvailabilitySpecificationsTests.java deleted file mode 100644 index c9f16f96d42b..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckNameAvailabilitySpecificationsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.CheckNameAvailabilitySpecifications; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilitySpecificationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilitySpecifications model = BinaryData.fromString( - "{\"enableDefaultValidation\":true,\"resourceTypesWithCustomValidation\":[\"fvovbvmeuecivy\",\"zceuojgjrw\"]}") - .toObject(CheckNameAvailabilitySpecifications.class); - Assertions.assertEquals(true, model.enableDefaultValidation()); - Assertions.assertEquals("fvovbvmeuecivy", model.resourceTypesWithCustomValidation().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilitySpecifications model - = new CheckNameAvailabilitySpecifications().withEnableDefaultValidation(true) - .withResourceTypesWithCustomValidation(Arrays.asList("fvovbvmeuecivy", "zceuojgjrw")); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilitySpecifications.class); - Assertions.assertEquals(true, model.enableDefaultValidation()); - Assertions.assertEquals("fvovbvmeuecivy", model.resourceTypesWithCustomValidation().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestInfoInnerTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestInfoInnerTests.java deleted file mode 100644 index 2178feebef0a..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestInfoInnerTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.CheckinManifestInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class CheckinManifestInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckinManifestInfoInner model = BinaryData.fromString( - "{\"isCheckedIn\":true,\"statusMessage\":\"plcrpwjxeznoig\",\"pullRequest\":\"njwmwkpnbsazejj\",\"commitId\":\"kagfhsxtt\"}") - .toObject(CheckinManifestInfoInner.class); - Assertions.assertEquals(true, model.isCheckedIn()); - Assertions.assertEquals("plcrpwjxeznoig", model.statusMessage()); - Assertions.assertEquals("njwmwkpnbsazejj", model.pullRequest()); - Assertions.assertEquals("kagfhsxtt", model.commitId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckinManifestInfoInner model = new CheckinManifestInfoInner().withIsCheckedIn(true) - .withStatusMessage("plcrpwjxeznoig") - .withPullRequest("njwmwkpnbsazejj") - .withCommitId("kagfhsxtt"); - model = BinaryData.fromObject(model).toObject(CheckinManifestInfoInner.class); - Assertions.assertEquals(true, model.isCheckedIn()); - Assertions.assertEquals("plcrpwjxeznoig", model.statusMessage()); - Assertions.assertEquals("njwmwkpnbsazejj", model.pullRequest()); - Assertions.assertEquals("kagfhsxtt", model.commitId()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestParamsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestParamsTests.java deleted file mode 100644 index de25c1d7e1ac..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CheckinManifestParamsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.CheckinManifestParams; -import org.junit.jupiter.api.Assertions; - -public final class CheckinManifestParamsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckinManifestParams model - = BinaryData.fromString("{\"environment\":\"pvuzlmv\",\"baselineArmManifestLocation\":\"elfk\"}") - .toObject(CheckinManifestParams.class); - Assertions.assertEquals("pvuzlmv", model.environment()); - Assertions.assertEquals("elfk", model.baselineArmManifestLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckinManifestParams model - = new CheckinManifestParams().withEnvironment("pvuzlmv").withBaselineArmManifestLocation("elfk"); - model = BinaryData.fromObject(model).toObject(CheckinManifestParams.class); - Assertions.assertEquals("pvuzlmv", model.environment()); - Assertions.assertEquals("elfk", model.baselineArmManifestLocation()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutArrayResponseWithContinuationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutArrayResponseWithContinuationTests.java deleted file mode 100644 index 74bba5d5060c..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutArrayResponseWithContinuationTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.CustomRolloutInner; -import com.azure.resourcemanager.providerhub.fluent.models.ResourceTypeRegistrationInner; -import com.azure.resourcemanager.providerhub.models.CustomRolloutArrayResponseWithContinuation; -import com.azure.resourcemanager.providerhub.models.CustomRolloutProperties; -import com.azure.resourcemanager.providerhub.models.CustomRolloutPropertiesSpecification; -import com.azure.resourcemanager.providerhub.models.CustomRolloutPropertiesStatus; -import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationCanary; -import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationProviderRegistration; -import com.azure.resourcemanager.providerhub.models.ExtendedErrorInfo; -import com.azure.resourcemanager.providerhub.models.ProviderRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CustomRolloutArrayResponseWithContinuationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomRolloutArrayResponseWithContinuation model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"specification\":{\"canary\":{\"regions\":[\"ovawjvzunlu\",\"hnnpr\"]},\"providerRegistration\":{\"properties\":{},\"id\":\"peilpjzuaejxdu\",\"name\":\"tskzbbtdzumveek\",\"type\":\"pwo\"},\"resourceTypeRegistrations\":[{\"id\":\"kfpbs\",\"name\":\"yofd\",\"type\":\"luu\"},{\"id\":\"dttouwaboekqvkel\",\"name\":\"smv\",\"type\":\"xwyjsflhhc\"}]},\"status\":{\"completedRegions\":[\"jixisxyawjoyaqcs\"],\"failedOrSkippedRegions\":{\"pkii\":{},\"zyexzn\":{},\"lixhnrztfol\":{},\"bnxknalaulppg\":{}}}},\"id\":\"dtpnapnyiropuhp\",\"name\":\"gvpgy\",\"type\":\"gqgitxmedjvcsl\"}],\"nextLink\":\"qwwncw\"}") - .toObject(CustomRolloutArrayResponseWithContinuation.class); - Assertions.assertEquals(ProvisioningState.DELETED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("ovawjvzunlu", - model.value().get(0).properties().specification().canary().regions().get(0)); - Assertions.assertEquals("jixisxyawjoyaqcs", - model.value().get(0).properties().status().completedRegions().get(0)); - Assertions.assertEquals("qwwncw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomRolloutArrayResponseWithContinuation model = new CustomRolloutArrayResponseWithContinuation() - .withValue(Arrays.asList(new CustomRolloutInner() - .withProperties(new CustomRolloutProperties().withProvisioningState(ProvisioningState.DELETED) - .withSpecification(new CustomRolloutPropertiesSpecification() - .withCanary( - new CustomRolloutSpecificationCanary().withRegions(Arrays.asList("ovawjvzunlu", "hnnpr"))) - .withProviderRegistration(new CustomRolloutSpecificationProviderRegistration() - .withProperties(new ProviderRegistrationProperties())) - .withResourceTypeRegistrations( - Arrays.asList(new ResourceTypeRegistrationInner(), new ResourceTypeRegistrationInner()))) - .withStatus( - new CustomRolloutPropertiesStatus().withCompletedRegions(Arrays.asList("jixisxyawjoyaqcs")) - .withFailedOrSkippedRegions( - mapOf("pkii", new ExtendedErrorInfo(), "zyexzn", new ExtendedErrorInfo(), "lixhnrztfol", - new ExtendedErrorInfo(), "bnxknalaulppg", new ExtendedErrorInfo())))))) - .withNextLink("qwwncw"); - model = BinaryData.fromObject(model).toObject(CustomRolloutArrayResponseWithContinuation.class); - Assertions.assertEquals(ProvisioningState.DELETED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("ovawjvzunlu", - model.value().get(0).properties().specification().canary().regions().get(0)); - Assertions.assertEquals("jixisxyawjoyaqcs", - model.value().get(0).properties().status().completedRegions().get(0)); - Assertions.assertEquals("qwwncw", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutSpecificationCanaryTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutSpecificationCanaryTests.java deleted file mode 100644 index 5f1f2f12abfa..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/CustomRolloutSpecificationCanaryTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.CustomRolloutSpecificationCanary; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CustomRolloutSpecificationCanaryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomRolloutSpecificationCanary model - = BinaryData.fromString("{\"regions\":[\"knryrtihfxtij\",\"pzvgnwzsymglzufc\",\"zk\"]}") - .toObject(CustomRolloutSpecificationCanary.class); - Assertions.assertEquals("knryrtihfxtij", model.regions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomRolloutSpecificationCanary model = new CustomRolloutSpecificationCanary() - .withRegions(Arrays.asList("knryrtihfxtij", "pzvgnwzsymglzufc", "zk")); - model = BinaryData.fromObject(model).toObject(CustomRolloutSpecificationCanary.class); - Assertions.assertEquals("knryrtihfxtij", model.regions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutArrayResponseWithContinuationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutArrayResponseWithContinuationTests.java deleted file mode 100644 index 2f1d963a241b..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutArrayResponseWithContinuationTests.java +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.DefaultRolloutInner; -import com.azure.resourcemanager.providerhub.fluent.models.ResourceTypeRegistrationInner; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutArrayResponseWithContinuation; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutProperties; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutPropertiesSpecification; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutPropertiesStatus; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationCanary; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationHighTraffic; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationLowTraffic; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationMediumTraffic; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationProviderRegistration; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupOne; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo; -import com.azure.resourcemanager.providerhub.models.ExtendedErrorInfo; -import com.azure.resourcemanager.providerhub.models.ProviderRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SubscriptionReregistrationResult; -import com.azure.resourcemanager.providerhub.models.TrafficRegionCategory; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DefaultRolloutArrayResponseWithContinuationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultRolloutArrayResponseWithContinuation model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"specification\":{\"canary\":{\"skipRegions\":[\"xbjhwuaanozjosph\",\"oulpjrv\",\"ag\",\"rvimjwosytxitcsk\"],\"regions\":[\"tq\"]},\"lowTraffic\":{\"waitDuration\":\"PT212H22M22S\",\"regions\":[\"ez\"]},\"mediumTraffic\":{\"waitDuration\":\"PT153H38M58S\",\"regions\":[\"fjhdg\"]},\"highTraffic\":{\"waitDuration\":\"PT78H22M\",\"regions\":[\"unygaeqid\",\"qfatpxllrxcyjm\"]},\"restOfTheWorldGroupOne\":{\"waitDuration\":\"PT230H27M35S\",\"regions\":[\"arm\",\"wdmjsjqbjhhyx\",\"rw\"]},\"restOfTheWorldGroupTwo\":{\"waitDuration\":\"PT104H50M40S\",\"regions\":[\"hp\",\"xkgymareqnajxqu\",\"jhkycub\"]},\"providerRegistration\":{\"properties\":{},\"id\":\"gssofwq\",\"name\":\"zqalkrmnjijpx\",\"type\":\"cqqudf\"},\"resourceTypeRegistrations\":[{\"id\":\"xbaaabjyv\",\"name\":\"yffimrzrtuzqogs\",\"type\":\"xnevfdnwn\"},{\"id\":\"mewzsyyc\",\"name\":\"uzsoi\",\"type\":\"judpfrxt\"},{\"id\":\"thzvaytdwkqbrqu\",\"name\":\"paxh\",\"type\":\"xiilivpdtiirqt\"},{\"id\":\"qoaxoruzfgs\",\"name\":\"uyfxrxxleptramxj\",\"type\":\"zwl\"}]},\"status\":{\"nextTrafficRegion\":\"None\",\"nextTrafficRegionScheduledTime\":\"2021-09-16T02:47:22Z\",\"subscriptionReregistrationResult\":\"ForcedUpdate\",\"completedRegions\":[\"dy\"],\"failedOrSkippedRegions\":{\"dooaojkniodko\":{},\"ebwnujhe\":{}}}},\"id\":\"msbvdkcrodtjinf\",\"name\":\"jlfltkacjvefkdlf\",\"type\":\"akggkfpag\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"specification\":{\"canary\":{\"skipRegions\":[\"blylsyxkqjnsj\",\"r\",\"tiagx\"],\"regions\":[\"zuempsbzkf\"]},\"lowTraffic\":{\"waitDuration\":\"PT209H9M36S\",\"regions\":[\"nqicvinvkjjxdxrb\"]},\"mediumTraffic\":{\"waitDuration\":\"PT118H49M34S\",\"regions\":[\"ewyhml\",\"paztzpofncck\",\"yfzqwhxxbu\"]},\"highTraffic\":{\"waitDuration\":\"PT173H18M2S\",\"regions\":[\"eqz\",\"ppriol\",\"or\"]},\"restOfTheWorldGroupOne\":{\"waitDuration\":\"PT225H53M1S\",\"regions\":[\"mncwsobqwcsdb\",\"wdcfhucqdpfuv\"]},\"restOfTheWorldGroupTwo\":{\"waitDuration\":\"PT60H51M6S\",\"regions\":[\"ca\",\"vxb\",\"t\",\"udutnco\"]},\"providerRegistration\":{\"properties\":{},\"id\":\"lxqtvcofudfl\",\"name\":\"kgjubgdknnqvsazn\",\"type\":\"n\"},\"resourceTypeRegistrations\":[{\"id\":\"udsgs\",\"name\":\"hmk\",\"type\":\"c\"},{\"id\":\"rauwjuetaebu\",\"name\":\"u\",\"type\":\"dmovsm\"}]},\"status\":{\"nextTrafficRegion\":\"Canary\",\"nextTrafficRegionScheduledTime\":\"2021-09-08T15:53:42Z\",\"subscriptionReregistrationResult\":\"NotApplicable\",\"completedRegions\":[\"fkifr\",\"tpuqujmq\"],\"failedOrSkippedRegions\":{\"fbtndoaong\":{},\"jcntuj\":{},\"tcje\":{},\"ftwwaezkojvdc\":{}}}},\"id\":\"zfoqouicybxar\",\"name\":\"gszufoxciqopid\",\"type\":\"amcio\"},{\"properties\":{\"provisioningState\":\"MovingResources\",\"specification\":{\"canary\":{\"skipRegions\":[\"hnzbonl\",\"ntoe\",\"okdwb\"],\"regions\":[\"szzcmrvexztv\",\"t\",\"gsfraoyzkoow\",\"lmnguxaw\"]},\"lowTraffic\":{\"waitDuration\":\"PT141H48M11S\",\"regions\":[\"uuximerq\",\"obwyznkb\",\"kutwpf\",\"pagmhrskdsnf\"]},\"mediumTraffic\":{\"waitDuration\":\"PT219H58M49S\",\"regions\":[\"gtdlmk\",\"zev\",\"l\"]},\"highTraffic\":{\"waitDuration\":\"PT219H51M54S\",\"regions\":[\"dsttwvo\",\"vbbejdcng\",\"qmoa\"]},\"restOfTheWorldGroupOne\":{\"waitDuration\":\"PT139H45M43S\",\"regions\":[\"zr\",\"rdgrtw\",\"enuuzkopbm\"]},\"restOfTheWorldGroupTwo\":{\"waitDuration\":\"PT153H11M53S\",\"regions\":[\"oyuhhziui\",\"fozbhdmsmlmzqhof\",\"rmaequ\"]},\"providerRegistration\":{\"properties\":{},\"id\":\"xicslfao\",\"name\":\"z\",\"type\":\"iyylhalnswhccsp\"},\"resourceTypeRegistrations\":[{\"id\":\"ivwitqscywugg\",\"name\":\"oluhczbwemh\",\"type\":\"i\"},{\"id\":\"sbrgz\",\"name\":\"wmsweypqwd\",\"type\":\"ggicccnxqhue\"},{\"id\":\"mkttlstvlzywem\",\"name\":\"zrncsdt\",\"type\":\"lusiy\"}]},\"status\":{\"nextTrafficRegion\":\"RestOfTheWorldGroupTwo\",\"nextTrafficRegionScheduledTime\":\"2021-03-20T23:23:02Z\",\"subscriptionReregistrationResult\":\"NotApplicable\",\"completedRegions\":[\"lfeadcygq\"],\"failedOrSkippedRegions\":{\"hejhzisx\":{},\"fpel\":{},\"lppvksrpq\":{}}}},\"id\":\"ujzra\",\"name\":\"htwdwrftswibyrcd\",\"type\":\"bhshfwpracstwity\"},{\"properties\":{\"provisioningState\":\"Created\",\"specification\":{\"canary\":{\"skipRegions\":[\"dcpnmdyodnw\",\"xltjcvnhltiu\",\"cxnavv\",\"xqi\"],\"regions\":[\"unyowxwl\",\"djrkvfgbvfvpd\",\"odacizs\",\"q\"]},\"lowTraffic\":{\"waitDuration\":\"PT1H38M26S\",\"regions\":[\"bdeibqipqk\",\"hvxndzwmkrefajpj\"]},\"mediumTraffic\":{\"waitDuration\":\"PT217H8M26S\",\"regions\":[\"yhgbijtjivfx\",\"sjabibs\",\"stawfsdjpvkv\"]},\"highTraffic\":{\"waitDuration\":\"PT39H47S\",\"regions\":[\"zbzkdvncjabudurg\",\"akmokzhjjklf\",\"hmouwqlgzrfze\",\"yebizikayuh\"]},\"restOfTheWorldGroupOne\":{\"waitDuration\":\"PT141H57M59S\",\"regions\":[\"ybbqwrv\",\"ldgmfpgvmpip\"]},\"restOfTheWorldGroupTwo\":{\"waitDuration\":\"PT194H53M31S\",\"regions\":[\"qfxssmwutw\",\"dsrezpdrhneuyow\"]},\"providerRegistration\":{\"properties\":{},\"id\":\"wyt\",\"name\":\"sibircgpi\",\"type\":\"pzimejzanlfzxi\"},\"resourceTypeRegistrations\":[{\"id\":\"mbzonokix\",\"name\":\"jq\",\"type\":\"irgzp\"},{\"id\":\"rlazszrnw\",\"name\":\"iin\",\"type\":\"fpwpjylwbt\"}]},\"status\":{\"nextTrafficRegion\":\"Canary\",\"nextTrafficRegionScheduledTime\":\"2021-08-09T06:27:36Z\",\"subscriptionReregistrationResult\":\"ConditionalUpdate\",\"completedRegions\":[\"zfjvfbgofe\",\"jagrqmqhldvr\",\"iiojnal\",\"hfkvtvsexsowuel\"],\"failedOrSkippedRegions\":{\"hahhxvrhmzkwpj\":{},\"wws\":{},\"ughftqsx\":{},\"qxujxukndxd\":{}}}},\"id\":\"grjguufzd\",\"name\":\"syqtfi\",\"type\":\"whbotzingamv\"}],\"nextLink\":\"ho\"}") - .toObject(DefaultRolloutArrayResponseWithContinuation.class); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("xbjhwuaanozjosph", - model.value().get(0).properties().specification().canary().skipRegions().get(0)); - Assertions.assertEquals("tq", model.value().get(0).properties().specification().canary().regions().get(0)); - Assertions.assertEquals("ez", model.value().get(0).properties().specification().lowTraffic().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT212H22M22S"), - model.value().get(0).properties().specification().lowTraffic().waitDuration()); - Assertions.assertEquals("fjhdg", - model.value().get(0).properties().specification().mediumTraffic().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT153H38M58S"), - model.value().get(0).properties().specification().mediumTraffic().waitDuration()); - Assertions.assertEquals("unygaeqid", - model.value().get(0).properties().specification().highTraffic().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT78H22M"), - model.value().get(0).properties().specification().highTraffic().waitDuration()); - Assertions.assertEquals("arm", - model.value().get(0).properties().specification().restOfTheWorldGroupOne().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT230H27M35S"), - model.value().get(0).properties().specification().restOfTheWorldGroupOne().waitDuration()); - Assertions.assertEquals("hp", - model.value().get(0).properties().specification().restOfTheWorldGroupTwo().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT104H50M40S"), - model.value().get(0).properties().specification().restOfTheWorldGroupTwo().waitDuration()); - Assertions.assertEquals("dy", model.value().get(0).properties().status().completedRegions().get(0)); - Assertions.assertEquals(TrafficRegionCategory.NONE, - model.value().get(0).properties().status().nextTrafficRegion()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:47:22Z"), - model.value().get(0).properties().status().nextTrafficRegionScheduledTime()); - Assertions.assertEquals(SubscriptionReregistrationResult.FORCED_UPDATE, - model.value().get(0).properties().status().subscriptionReregistrationResult()); - Assertions.assertEquals("ho", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultRolloutArrayResponseWithContinuation model - = new DefaultRolloutArrayResponseWithContinuation() - .withValue( - Arrays - .asList( - new DefaultRolloutInner() - .withProperties( - new DefaultRolloutProperties() - .withProvisioningState(ProvisioningState.NOT_SPECIFIED) - .withSpecification(new DefaultRolloutPropertiesSpecification() - .withCanary(new DefaultRolloutSpecificationCanary() - .withSkipRegions(Arrays.asList("xbjhwuaanozjosph", "oulpjrv", "ag", - "rvimjwosytxitcsk")) - .withRegions(Arrays.asList("tq"))) - .withLowTraffic(new DefaultRolloutSpecificationLowTraffic() - .withRegions(Arrays.asList("ez")) - .withWaitDuration(Duration.parse("PT212H22M22S"))) - .withMediumTraffic(new DefaultRolloutSpecificationMediumTraffic() - .withRegions(Arrays.asList("fjhdg")) - .withWaitDuration(Duration.parse("PT153H38M58S"))) - .withHighTraffic(new DefaultRolloutSpecificationHighTraffic() - .withRegions(Arrays.asList("unygaeqid", "qfatpxllrxcyjm")) - .withWaitDuration(Duration.parse("PT78H22M"))) - .withRestOfTheWorldGroupOne( - new DefaultRolloutSpecificationRestOfTheWorldGroupOne() - .withRegions(Arrays.asList("arm", "wdmjsjqbjhhyx", "rw")) - .withWaitDuration(Duration.parse("PT230H27M35S"))) - .withRestOfTheWorldGroupTwo( - new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() - .withRegions(Arrays.asList("hp", "xkgymareqnajxqu", "jhkycub")) - .withWaitDuration(Duration.parse("PT104H50M40S"))) - .withProviderRegistration( - new DefaultRolloutSpecificationProviderRegistration() - .withProperties(new ProviderRegistrationProperties())) - .withResourceTypeRegistrations( - Arrays.asList(new ResourceTypeRegistrationInner(), - new ResourceTypeRegistrationInner(), - new ResourceTypeRegistrationInner(), - new ResourceTypeRegistrationInner()))) - .withStatus(new DefaultRolloutPropertiesStatus() - .withCompletedRegions(Arrays.asList("dy")) - .withFailedOrSkippedRegions(mapOf("dooaojkniodko", new ExtendedErrorInfo(), - "ebwnujhe", new ExtendedErrorInfo())) - .withNextTrafficRegion(TrafficRegionCategory.NONE) - .withNextTrafficRegionScheduledTime( - OffsetDateTime.parse("2021-09-16T02:47:22Z")) - .withSubscriptionReregistrationResult( - SubscriptionReregistrationResult.FORCED_UPDATE))), - new DefaultRolloutInner().withProperties( - new DefaultRolloutProperties().withProvisioningState(ProvisioningState.SUCCEEDED) - .withSpecification(new DefaultRolloutPropertiesSpecification() - .withCanary(new DefaultRolloutSpecificationCanary() - .withSkipRegions(Arrays.asList("blylsyxkqjnsj", "r", "tiagx")) - .withRegions(Arrays.asList("zuempsbzkf"))) - .withLowTraffic(new DefaultRolloutSpecificationLowTraffic() - .withRegions(Arrays.asList("nqicvinvkjjxdxrb")) - .withWaitDuration(Duration.parse("PT209H9M36S"))) - .withMediumTraffic(new DefaultRolloutSpecificationMediumTraffic() - .withRegions(Arrays.asList("ewyhml", "paztzpofncck", "yfzqwhxxbu")) - .withWaitDuration(Duration.parse("PT118H49M34S"))) - .withHighTraffic(new DefaultRolloutSpecificationHighTraffic() - .withRegions(Arrays.asList("eqz", "ppriol", "or")) - .withWaitDuration(Duration.parse("PT173H18M2S"))) - .withRestOfTheWorldGroupOne( - new DefaultRolloutSpecificationRestOfTheWorldGroupOne() - .withRegions(Arrays.asList("mncwsobqwcsdb", "wdcfhucqdpfuv")) - .withWaitDuration(Duration.parse("PT225H53M1S"))) - .withRestOfTheWorldGroupTwo( - new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() - .withRegions(Arrays.asList("ca", "vxb", "t", "udutnco")) - .withWaitDuration(Duration.parse("PT60H51M6S"))) - .withProviderRegistration(new DefaultRolloutSpecificationProviderRegistration() - .withProperties(new ProviderRegistrationProperties())) - .withResourceTypeRegistrations(Arrays.asList( - new ResourceTypeRegistrationInner(), new ResourceTypeRegistrationInner()))) - .withStatus(new DefaultRolloutPropertiesStatus() - .withCompletedRegions(Arrays.asList("fkifr", "tpuqujmq")) - .withFailedOrSkippedRegions(mapOf("fbtndoaong", new ExtendedErrorInfo(), - "jcntuj", new ExtendedErrorInfo(), "tcje", new ExtendedErrorInfo(), - "ftwwaezkojvdc", new ExtendedErrorInfo())) - .withNextTrafficRegion(TrafficRegionCategory.CANARY) - .withNextTrafficRegionScheduledTime( - OffsetDateTime.parse("2021-09-08T15:53:42Z")) - .withSubscriptionReregistrationResult( - SubscriptionReregistrationResult.NOT_APPLICABLE))), - new DefaultRolloutInner().withProperties(new DefaultRolloutProperties() - .withProvisioningState(ProvisioningState.MOVING_RESOURCES) - .withSpecification(new DefaultRolloutPropertiesSpecification() - .withCanary(new DefaultRolloutSpecificationCanary() - .withSkipRegions(Arrays.asList("hnzbonl", "ntoe", "okdwb")) - .withRegions(Arrays.asList("szzcmrvexztv", "t", "gsfraoyzkoow", "lmnguxaw"))) - .withLowTraffic(new DefaultRolloutSpecificationLowTraffic() - .withRegions(Arrays.asList("uuximerq", "obwyznkb", "kutwpf", "pagmhrskdsnf")) - .withWaitDuration(Duration.parse("PT141H48M11S"))) - .withMediumTraffic(new DefaultRolloutSpecificationMediumTraffic() - .withRegions(Arrays.asList("gtdlmk", "zev", "l")) - .withWaitDuration(Duration.parse("PT219H58M49S"))) - .withHighTraffic(new DefaultRolloutSpecificationHighTraffic() - .withRegions(Arrays.asList("dsttwvo", "vbbejdcng", "qmoa")) - .withWaitDuration(Duration.parse("PT219H51M54S"))) - .withRestOfTheWorldGroupOne(new DefaultRolloutSpecificationRestOfTheWorldGroupOne() - .withRegions(Arrays.asList("zr", "rdgrtw", "enuuzkopbm")) - .withWaitDuration(Duration.parse("PT139H45M43S"))) - .withRestOfTheWorldGroupTwo(new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() - .withRegions(Arrays.asList("oyuhhziui", "fozbhdmsmlmzqhof", "rmaequ")) - .withWaitDuration(Duration.parse("PT153H11M53S"))) - .withProviderRegistration(new DefaultRolloutSpecificationProviderRegistration() - .withProperties(new ProviderRegistrationProperties())) - .withResourceTypeRegistrations(Arrays.asList(new ResourceTypeRegistrationInner(), - new ResourceTypeRegistrationInner(), new ResourceTypeRegistrationInner()))) - .withStatus(new DefaultRolloutPropertiesStatus() - .withCompletedRegions(Arrays.asList("lfeadcygq")) - .withFailedOrSkippedRegions(mapOf("hejhzisx", new ExtendedErrorInfo(), "fpel", - new ExtendedErrorInfo(), "lppvksrpq", new ExtendedErrorInfo())) - .withNextTrafficRegion(TrafficRegionCategory.REST_OF_THE_WORLD_GROUP_TWO) - .withNextTrafficRegionScheduledTime(OffsetDateTime.parse("2021-03-20T23:23:02Z")) - .withSubscriptionReregistrationResult( - SubscriptionReregistrationResult.NOT_APPLICABLE))), - new DefaultRolloutInner().withProperties( - new DefaultRolloutProperties().withProvisioningState(ProvisioningState.CREATED) - .withSpecification(new DefaultRolloutPropertiesSpecification() - .withCanary(new DefaultRolloutSpecificationCanary() - .withSkipRegions( - Arrays.asList("dcpnmdyodnw", "xltjcvnhltiu", "cxnavv", "xqi")) - .withRegions(Arrays.asList("unyowxwl", "djrkvfgbvfvpd", "odacizs", "q"))) - .withLowTraffic(new DefaultRolloutSpecificationLowTraffic() - .withRegions(Arrays.asList("bdeibqipqk", "hvxndzwmkrefajpj")) - .withWaitDuration(Duration.parse("PT1H38M26S"))) - .withMediumTraffic(new DefaultRolloutSpecificationMediumTraffic() - .withRegions(Arrays.asList("yhgbijtjivfx", "sjabibs", "stawfsdjpvkv")) - .withWaitDuration(Duration.parse("PT217H8M26S"))) - .withHighTraffic(new DefaultRolloutSpecificationHighTraffic() - .withRegions(Arrays.asList("zbzkdvncjabudurg", "akmokzhjjklf", - "hmouwqlgzrfze", "yebizikayuh")) - .withWaitDuration(Duration.parse("PT39H47S"))) - .withRestOfTheWorldGroupOne( - new DefaultRolloutSpecificationRestOfTheWorldGroupOne() - .withRegions(Arrays.asList("ybbqwrv", "ldgmfpgvmpip")) - .withWaitDuration(Duration.parse("PT141H57M59S"))) - .withRestOfTheWorldGroupTwo( - new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() - .withRegions(Arrays.asList("qfxssmwutw", "dsrezpdrhneuyow")) - .withWaitDuration(Duration.parse("PT194H53M31S"))) - .withProviderRegistration(new DefaultRolloutSpecificationProviderRegistration() - .withProperties(new ProviderRegistrationProperties())) - .withResourceTypeRegistrations( - Arrays.asList( - new ResourceTypeRegistrationInner(), - new ResourceTypeRegistrationInner()))) - .withStatus(new DefaultRolloutPropertiesStatus() - .withCompletedRegions( - Arrays.asList("zfjvfbgofe", "jagrqmqhldvr", "iiojnal", "hfkvtvsexsowuel")) - .withFailedOrSkippedRegions(mapOf("hahhxvrhmzkwpj", new ExtendedErrorInfo(), - "wws", new ExtendedErrorInfo(), "ughftqsx", new ExtendedErrorInfo(), - "qxujxukndxd", new ExtendedErrorInfo())) - .withNextTrafficRegion(TrafficRegionCategory.CANARY) - .withNextTrafficRegionScheduledTime( - OffsetDateTime.parse("2021-08-09T06:27:36Z")) - .withSubscriptionReregistrationResult( - SubscriptionReregistrationResult.CONDITIONAL_UPDATE))))) - .withNextLink("ho"); - model = BinaryData.fromObject(model).toObject(DefaultRolloutArrayResponseWithContinuation.class); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("xbjhwuaanozjosph", - model.value().get(0).properties().specification().canary().skipRegions().get(0)); - Assertions.assertEquals("tq", model.value().get(0).properties().specification().canary().regions().get(0)); - Assertions.assertEquals("ez", model.value().get(0).properties().specification().lowTraffic().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT212H22M22S"), - model.value().get(0).properties().specification().lowTraffic().waitDuration()); - Assertions.assertEquals("fjhdg", - model.value().get(0).properties().specification().mediumTraffic().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT153H38M58S"), - model.value().get(0).properties().specification().mediumTraffic().waitDuration()); - Assertions.assertEquals("unygaeqid", - model.value().get(0).properties().specification().highTraffic().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT78H22M"), - model.value().get(0).properties().specification().highTraffic().waitDuration()); - Assertions.assertEquals("arm", - model.value().get(0).properties().specification().restOfTheWorldGroupOne().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT230H27M35S"), - model.value().get(0).properties().specification().restOfTheWorldGroupOne().waitDuration()); - Assertions.assertEquals("hp", - model.value().get(0).properties().specification().restOfTheWorldGroupTwo().regions().get(0)); - Assertions.assertEquals(Duration.parse("PT104H50M40S"), - model.value().get(0).properties().specification().restOfTheWorldGroupTwo().waitDuration()); - Assertions.assertEquals("dy", model.value().get(0).properties().status().completedRegions().get(0)); - Assertions.assertEquals(TrafficRegionCategory.NONE, - model.value().get(0).properties().status().nextTrafficRegion()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:47:22Z"), - model.value().get(0).properties().status().nextTrafficRegionScheduledTime()); - Assertions.assertEquals(SubscriptionReregistrationResult.FORCED_UPDATE, - model.value().get(0).properties().status().subscriptionReregistrationResult()); - Assertions.assertEquals("ho", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationCanaryTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationCanaryTests.java deleted file mode 100644 index 0686460e24d9..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationCanaryTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationCanary; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultRolloutSpecificationCanaryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultRolloutSpecificationCanary model - = BinaryData.fromString("{\"skipRegions\":[\"iobyu\"],\"regions\":[\"pqlpq\",\"cciuqgbdbutau\"]}") - .toObject(DefaultRolloutSpecificationCanary.class); - Assertions.assertEquals("iobyu", model.skipRegions().get(0)); - Assertions.assertEquals("pqlpq", model.regions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultRolloutSpecificationCanary model - = new DefaultRolloutSpecificationCanary().withSkipRegions(Arrays.asList("iobyu")) - .withRegions(Arrays.asList("pqlpq", "cciuqgbdbutau")); - model = BinaryData.fromObject(model).toObject(DefaultRolloutSpecificationCanary.class); - Assertions.assertEquals("iobyu", model.skipRegions().get(0)); - Assertions.assertEquals("pqlpq", model.regions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationHighTrafficTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationHighTrafficTests.java deleted file mode 100644 index 1609545f477f..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationHighTrafficTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationHighTraffic; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultRolloutSpecificationHighTrafficTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultRolloutSpecificationHighTraffic model = BinaryData - .fromString("{\"waitDuration\":\"PT12M31S\",\"regions\":[\"synljphuopxodl\",\"iyntorzihle\",\"sjswsrms\"]}") - .toObject(DefaultRolloutSpecificationHighTraffic.class); - Assertions.assertEquals("synljphuopxodl", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT12M31S"), model.waitDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultRolloutSpecificationHighTraffic model = new DefaultRolloutSpecificationHighTraffic() - .withRegions(Arrays.asList("synljphuopxodl", "iyntorzihle", "sjswsrms")) - .withWaitDuration(Duration.parse("PT12M31S")); - model = BinaryData.fromObject(model).toObject(DefaultRolloutSpecificationHighTraffic.class); - Assertions.assertEquals("synljphuopxodl", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT12M31S"), model.waitDuration()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationLowTrafficTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationLowTrafficTests.java deleted file mode 100644 index f898bcd19499..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationLowTrafficTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationLowTraffic; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultRolloutSpecificationLowTrafficTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultRolloutSpecificationLowTraffic model - = BinaryData.fromString("{\"waitDuration\":\"PT190H27M4S\",\"regions\":[\"ndsytgadg\"]}") - .toObject(DefaultRolloutSpecificationLowTraffic.class); - Assertions.assertEquals("ndsytgadg", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT190H27M4S"), model.waitDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultRolloutSpecificationLowTraffic model - = new DefaultRolloutSpecificationLowTraffic().withRegions(Arrays.asList("ndsytgadg")) - .withWaitDuration(Duration.parse("PT190H27M4S")); - model = BinaryData.fromObject(model).toObject(DefaultRolloutSpecificationLowTraffic.class); - Assertions.assertEquals("ndsytgadg", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT190H27M4S"), model.waitDuration()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationMediumTrafficTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationMediumTrafficTests.java deleted file mode 100644 index 921cf6cb2e77..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationMediumTrafficTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationMediumTraffic; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultRolloutSpecificationMediumTrafficTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultRolloutSpecificationMediumTraffic model = BinaryData - .fromString( - "{\"waitDuration\":\"PT184H39M53S\",\"regions\":[\"acewiipfpubjibw\",\"iftohqkvpu\",\"ksgplsa\"]}") - .toObject(DefaultRolloutSpecificationMediumTraffic.class); - Assertions.assertEquals("acewiipfpubjibw", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT184H39M53S"), model.waitDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultRolloutSpecificationMediumTraffic model = new DefaultRolloutSpecificationMediumTraffic() - .withRegions(Arrays.asList("acewiipfpubjibw", "iftohqkvpu", "ksgplsa")) - .withWaitDuration(Duration.parse("PT184H39M53S")); - model = BinaryData.fromObject(model).toObject(DefaultRolloutSpecificationMediumTraffic.class); - Assertions.assertEquals("acewiipfpubjibw", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT184H39M53S"), model.waitDuration()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupOneTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupOneTests.java deleted file mode 100644 index 45e047ed390a..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupOneTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupOne; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultRolloutSpecificationRestOfTheWorldGroupOneTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultRolloutSpecificationRestOfTheWorldGroupOne model - = BinaryData.fromString("{\"waitDuration\":\"PT204H22M\",\"regions\":[\"zbchckqqzqioxiy\",\"uiizynke\"]}") - .toObject(DefaultRolloutSpecificationRestOfTheWorldGroupOne.class); - Assertions.assertEquals("zbchckqqzqioxiy", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT204H22M"), model.waitDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultRolloutSpecificationRestOfTheWorldGroupOne model - = new DefaultRolloutSpecificationRestOfTheWorldGroupOne() - .withRegions(Arrays.asList("zbchckqqzqioxiy", "uiizynke")) - .withWaitDuration(Duration.parse("PT204H22M")); - model = BinaryData.fromObject(model).toObject(DefaultRolloutSpecificationRestOfTheWorldGroupOne.class); - Assertions.assertEquals("zbchckqqzqioxiy", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT204H22M"), model.waitDuration()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupTwoTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupTwoTests.java deleted file mode 100644 index 293f66c39589..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutSpecificationRestOfTheWorldGroupTwoTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultRolloutSpecificationRestOfTheWorldGroupTwoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultRolloutSpecificationRestOfTheWorldGroupTwo model = BinaryData.fromString( - "{\"waitDuration\":\"PT62H37M52S\",\"regions\":[\"wyhqmibzyhwits\",\"ypyynpcdpumnzg\",\"wznm\",\"biknsorgjhxbld\"]}") - .toObject(DefaultRolloutSpecificationRestOfTheWorldGroupTwo.class); - Assertions.assertEquals("wyhqmibzyhwits", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT62H37M52S"), model.waitDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultRolloutSpecificationRestOfTheWorldGroupTwo model - = new DefaultRolloutSpecificationRestOfTheWorldGroupTwo() - .withRegions(Arrays.asList("wyhqmibzyhwits", "ypyynpcdpumnzg", "wznm", "biknsorgjhxbld")) - .withWaitDuration(Duration.parse("PT62H37M52S")); - model = BinaryData.fromObject(model).toObject(DefaultRolloutSpecificationRestOfTheWorldGroupTwo.class); - Assertions.assertEquals("wyhqmibzyhwits", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT62H37M52S"), model.waitDuration()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteByResourceGroupWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 2cc023711da9..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DefaultRolloutsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.defaultRollouts() - .deleteByResourceGroupWithResponse("mczngn", "dxxewuninv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopWithResponseMockTests.java deleted file mode 100644 index f123eae9eabd..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/DefaultRolloutsStopWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DefaultRolloutsStopWithResponseMockTests { - @Test - public void testStopWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.defaultRollouts().stopWithResponse("wffplfmuvapc", "ccrrvweyoxoyyu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtendedLocationOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtendedLocationOptionsTests.java deleted file mode 100644 index 63b4cfa8851e..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtendedLocationOptionsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtendedLocationOptions; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocationOptions model - = BinaryData.fromString("{\"type\":\"hjdauwhvylwz\",\"supportedPolicy\":\"dhxujznbmpo\"}") - .toObject(ExtendedLocationOptions.class); - Assertions.assertEquals("hjdauwhvylwz", model.type()); - Assertions.assertEquals("dhxujznbmpo", model.supportedPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocationOptions model - = new ExtendedLocationOptions().withType("hjdauwhvylwz").withSupportedPolicy("dhxujznbmpo"); - model = BinaryData.fromObject(model).toObject(ExtendedLocationOptions.class); - Assertions.assertEquals("hjdauwhvylwz", model.type()); - Assertions.assertEquals("dhxujznbmpo", model.supportedPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtensionOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtensionOptionsTests.java deleted file mode 100644 index 3cb546af3ae0..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ExtensionOptionsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtensionOptionType; -import com.azure.resourcemanager.providerhub.models.ExtensionOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionOptions model = BinaryData.fromString( - "{\"request\":[\"IncludeInternalMetadata\"],\"response\":[\"IncludeInternalMetadata\",\"NotSpecified\"]}") - .toObject(ExtensionOptions.class); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, model.request().get(0)); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, model.response().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionOptions model - = new ExtensionOptions().withRequest(Arrays.asList(ExtensionOptionType.INCLUDE_INTERNAL_METADATA)) - .withResponse( - Arrays.asList(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, ExtensionOptionType.NOT_SPECIFIED)); - model = BinaryData.fromObject(model).toObject(ExtensionOptions.class); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, model.request().get(0)); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, model.response().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/FeaturesRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/FeaturesRuleTests.java deleted file mode 100644 index 399c7ec8e40f..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/FeaturesRuleTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.FeaturesRule; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesRule model = BinaryData.fromString("{\"requiredFeaturesPolicy\":\"Any\"}").toObject(FeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesRule model = new FeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ANY); - model = BinaryData.fromObject(model).toObject(FeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementPropertiesTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementPropertiesTests.java deleted file mode 100644 index 0354f6b57220..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.IdentityManagementProperties; -import com.azure.resourcemanager.providerhub.models.IdentityManagementTypes; -import org.junit.jupiter.api.Assertions; - -public final class IdentityManagementPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityManagementProperties model - = BinaryData.fromString("{\"type\":\"SystemAssigned\",\"applicationId\":\"ldawkzbaliourqha\"}") - .toObject(IdentityManagementProperties.class); - Assertions.assertEquals(IdentityManagementTypes.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("ldawkzbaliourqha", model.applicationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityManagementProperties model - = new IdentityManagementProperties().withType(IdentityManagementTypes.SYSTEM_ASSIGNED) - .withApplicationId("ldawkzbaliourqha"); - model = BinaryData.fromObject(model).toObject(IdentityManagementProperties.class); - Assertions.assertEquals(IdentityManagementTypes.SYSTEM_ASSIGNED, model.type()); - Assertions.assertEquals("ldawkzbaliourqha", model.applicationId()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementTests.java deleted file mode 100644 index f2150f6db676..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/IdentityManagementTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.IdentityManagement; -import com.azure.resourcemanager.providerhub.models.IdentityManagementTypes; -import org.junit.jupiter.api.Assertions; - -public final class IdentityManagementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityManagement model = BinaryData.fromString("{\"type\":\"Actor\"}").toObject(IdentityManagement.class); - Assertions.assertEquals(IdentityManagementTypes.ACTOR, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityManagement model = new IdentityManagement().withType(IdentityManagementTypes.ACTOR); - model = BinaryData.fromObject(model).toObject(IdentityManagement.class); - Assertions.assertEquals(IdentityManagementTypes.ACTOR, model.type()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LightHouseAuthorizationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LightHouseAuthorizationTests.java deleted file mode 100644 index add8b128e1c6..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LightHouseAuthorizationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.LightHouseAuthorization; -import org.junit.jupiter.api.Assertions; - -public final class LightHouseAuthorizationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LightHouseAuthorization model - = BinaryData.fromString("{\"principalId\":\"modmglougpb\",\"roleDefinitionId\":\"wtmutduq\"}") - .toObject(LightHouseAuthorization.class); - Assertions.assertEquals("modmglougpb", model.principalId()); - Assertions.assertEquals("wtmutduq", model.roleDefinitionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LightHouseAuthorization model - = new LightHouseAuthorization().withPrincipalId("modmglougpb").withRoleDefinitionId("wtmutduq"); - model = BinaryData.fromObject(model).toObject(LightHouseAuthorization.class); - Assertions.assertEquals("modmglougpb", model.principalId()); - Assertions.assertEquals("wtmutduq", model.roleDefinitionId()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedAccessCheckTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedAccessCheckTests.java deleted file mode 100644 index b6ea871296e4..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedAccessCheckTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.LinkedAccessCheck; -import org.junit.jupiter.api.Assertions; - -public final class LinkedAccessCheckTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinkedAccessCheck model = BinaryData.fromString( - "{\"actionName\":\"scwsv\",\"linkedProperty\":\"otogtwrupqs\",\"linkedAction\":\"nmic\",\"linkedActionVerb\":\"vce\",\"linkedType\":\"eil\"}") - .toObject(LinkedAccessCheck.class); - Assertions.assertEquals("scwsv", model.actionName()); - Assertions.assertEquals("otogtwrupqs", model.linkedProperty()); - Assertions.assertEquals("nmic", model.linkedAction()); - Assertions.assertEquals("vce", model.linkedActionVerb()); - Assertions.assertEquals("eil", model.linkedType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinkedAccessCheck model = new LinkedAccessCheck().withActionName("scwsv") - .withLinkedProperty("otogtwrupqs") - .withLinkedAction("nmic") - .withLinkedActionVerb("vce") - .withLinkedType("eil"); - model = BinaryData.fromObject(model).toObject(LinkedAccessCheck.class); - Assertions.assertEquals("scwsv", model.actionName()); - Assertions.assertEquals("otogtwrupqs", model.linkedProperty()); - Assertions.assertEquals("nmic", model.linkedAction()); - Assertions.assertEquals("vce", model.linkedActionVerb()); - Assertions.assertEquals("eil", model.linkedType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedOperationRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedOperationRuleTests.java deleted file mode 100644 index e9cf1b3b42e7..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LinkedOperationRuleTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.LinkedAction; -import com.azure.resourcemanager.providerhub.models.LinkedOperation; -import com.azure.resourcemanager.providerhub.models.LinkedOperationRule; -import org.junit.jupiter.api.Assertions; - -public final class LinkedOperationRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinkedOperationRule model = BinaryData - .fromString("{\"linkedOperation\":\"CrossResourceGroupResourceMove\",\"linkedAction\":\"NotSpecified\"}") - .toObject(LinkedOperationRule.class); - Assertions.assertEquals(LinkedOperation.CROSS_RESOURCE_GROUP_RESOURCE_MOVE, model.linkedOperation()); - Assertions.assertEquals(LinkedAction.NOT_SPECIFIED, model.linkedAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinkedOperationRule model - = new LinkedOperationRule().withLinkedOperation(LinkedOperation.CROSS_RESOURCE_GROUP_RESOURCE_MOVE) - .withLinkedAction(LinkedAction.NOT_SPECIFIED); - model = BinaryData.fromObject(model).toObject(LinkedOperationRule.class); - Assertions.assertEquals(LinkedOperation.CROSS_RESOURCE_GROUP_RESOURCE_MOVE, model.linkedOperation()); - Assertions.assertEquals(LinkedAction.NOT_SPECIFIED, model.linkedAction()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingHiddenPropertyPathTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingHiddenPropertyPathTests.java deleted file mode 100644 index 8ef14e5fd3fd..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingHiddenPropertyPathTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.LoggingHiddenPropertyPath; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoggingHiddenPropertyPathTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoggingHiddenPropertyPath model = BinaryData.fromString( - "{\"hiddenPathsOnRequest\":[\"bh\",\"kfrlhrxsbky\",\"pycanuzbpz\"],\"hiddenPathsOnResponse\":[\"kuwbcrnwb\",\"ehhseyvjusrts\",\"hspkdeemao\",\"mx\"]}") - .toObject(LoggingHiddenPropertyPath.class); - Assertions.assertEquals("bh", model.hiddenPathsOnRequest().get(0)); - Assertions.assertEquals("kuwbcrnwb", model.hiddenPathsOnResponse().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoggingHiddenPropertyPath model - = new LoggingHiddenPropertyPath().withHiddenPathsOnRequest(Arrays.asList("bh", "kfrlhrxsbky", "pycanuzbpz")) - .withHiddenPathsOnResponse(Arrays.asList("kuwbcrnwb", "ehhseyvjusrts", "hspkdeemao", "mx")); - model = BinaryData.fromObject(model).toObject(LoggingHiddenPropertyPath.class); - Assertions.assertEquals("bh", model.hiddenPathsOnRequest().get(0)); - Assertions.assertEquals("kuwbcrnwb", model.hiddenPathsOnResponse().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleHiddenPropertyPathsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleHiddenPropertyPathsTests.java deleted file mode 100644 index 09ae99736d8c..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleHiddenPropertyPathsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.LoggingRuleHiddenPropertyPaths; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoggingRuleHiddenPropertyPathsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoggingRuleHiddenPropertyPaths model = BinaryData.fromString( - "{\"hiddenPathsOnRequest\":[\"gxywpmue\",\"fjz\",\"fqkquj\"],\"hiddenPathsOnResponse\":[\"uyonobglaoc\",\"xtccmg\",\"udxytlmoyrx\",\"wfudwpzntxhdzhl\"]}") - .toObject(LoggingRuleHiddenPropertyPaths.class); - Assertions.assertEquals("gxywpmue", model.hiddenPathsOnRequest().get(0)); - Assertions.assertEquals("uyonobglaoc", model.hiddenPathsOnResponse().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoggingRuleHiddenPropertyPaths model - = new LoggingRuleHiddenPropertyPaths().withHiddenPathsOnRequest(Arrays.asList("gxywpmue", "fjz", "fqkquj")) - .withHiddenPathsOnResponse(Arrays.asList("uyonobglaoc", "xtccmg", "udxytlmoyrx", "wfudwpzntxhdzhl")); - model = BinaryData.fromObject(model).toObject(LoggingRuleHiddenPropertyPaths.class); - Assertions.assertEquals("gxywpmue", model.hiddenPathsOnRequest().get(0)); - Assertions.assertEquals("uyonobglaoc", model.hiddenPathsOnResponse().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleTests.java deleted file mode 100644 index 95dda8a58421..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/LoggingRuleTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.LoggingDetails; -import com.azure.resourcemanager.providerhub.models.LoggingDirections; -import com.azure.resourcemanager.providerhub.models.LoggingRule; -import com.azure.resourcemanager.providerhub.models.LoggingRuleHiddenPropertyPaths; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoggingRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoggingRule model = BinaryData.fromString( - "{\"action\":\"vnotyfjfcnj\",\"direction\":\"Request\",\"detailLevel\":\"None\",\"hiddenPropertyPaths\":{\"hiddenPathsOnRequest\":[\"hbttkphyw\"],\"hiddenPathsOnResponse\":[\"jtoqne\",\"mclfplphoxuscr\",\"abgy\",\"psbjta\"]}}") - .toObject(LoggingRule.class); - Assertions.assertEquals("vnotyfjfcnj", model.action()); - Assertions.assertEquals(LoggingDirections.REQUEST, model.direction()); - Assertions.assertEquals(LoggingDetails.NONE, model.detailLevel()); - Assertions.assertEquals("hbttkphyw", model.hiddenPropertyPaths().hiddenPathsOnRequest().get(0)); - Assertions.assertEquals("jtoqne", model.hiddenPropertyPaths().hiddenPathsOnResponse().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoggingRule model = new LoggingRule().withAction("vnotyfjfcnj") - .withDirection(LoggingDirections.REQUEST) - .withDetailLevel(LoggingDetails.NONE) - .withHiddenPropertyPaths( - new LoggingRuleHiddenPropertyPaths().withHiddenPathsOnRequest(Arrays.asList("hbttkphyw")) - .withHiddenPathsOnResponse(Arrays.asList("jtoqne", "mclfplphoxuscr", "abgy", "psbjta"))); - model = BinaryData.fromObject(model).toObject(LoggingRule.class); - Assertions.assertEquals("vnotyfjfcnj", model.action()); - Assertions.assertEquals(LoggingDirections.REQUEST, model.direction()); - Assertions.assertEquals(LoggingDetails.NONE, model.detailLevel()); - Assertions.assertEquals("hbttkphyw", model.hiddenPropertyPaths().hiddenPathsOnRequest().get(0)); - Assertions.assertEquals("jtoqne", model.hiddenPropertyPaths().hiddenPathsOnResponse().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationEndpointTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationEndpointTests.java deleted file mode 100644 index 36911b6fdb32..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationEndpointTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.NotificationEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NotificationEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationEndpoint model - = BinaryData.fromString("{\"notificationDestination\":\"efr\",\"locations\":[\"gaojf\",\"wncot\",\"rfh\"]}") - .toObject(NotificationEndpoint.class); - Assertions.assertEquals("efr", model.notificationDestination()); - Assertions.assertEquals("gaojf", model.locations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationEndpoint model = new NotificationEndpoint().withNotificationDestination("efr") - .withLocations(Arrays.asList("gaojf", "wncot", "rfh")); - model = BinaryData.fromObject(model).toObject(NotificationEndpoint.class); - Assertions.assertEquals("efr", model.notificationDestination()); - Assertions.assertEquals("gaojf", model.locations().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationArrayResponseWithContinuationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationArrayResponseWithContinuationTests.java deleted file mode 100644 index 82c60786683e..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationArrayResponseWithContinuationTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.NotificationRegistrationInner; -import com.azure.resourcemanager.providerhub.models.MessageScope; -import com.azure.resourcemanager.providerhub.models.NotificationEndpoint; -import com.azure.resourcemanager.providerhub.models.NotificationMode; -import com.azure.resourcemanager.providerhub.models.NotificationRegistrationArrayResponseWithContinuation; -import com.azure.resourcemanager.providerhub.models.NotificationRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NotificationRegistrationArrayResponseWithContinuationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationRegistrationArrayResponseWithContinuation model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"notificationMode\":\"EventHub\",\"messageScope\":\"RegisteredSubscriptions\",\"includedEvents\":[\"tpipiwyczuhx\",\"cpqjlihhyu\",\"pskasdvlmfwdg\"],\"notificationEndpoints\":[{\"notificationDestination\":\"ucvpamrs\",\"locations\":[\"zvxurisjnhny\"]},{\"notificationDestination\":\"ifqjz\",\"locations\":[\"rhublwpcesutrg\",\"upauut\",\"woqhihe\"]}],\"provisioningState\":\"Creating\"},\"id\":\"w\",\"name\":\"pnfqntcyp\",\"type\":\"xjvfoimwksl\"},{\"properties\":{\"notificationMode\":\"WebHook\",\"messageScope\":\"NotSpecified\",\"includedEvents\":[\"ydfce\",\"cvlhv\",\"gdyftumrtwna\",\"jslb\"],\"notificationEndpoints\":[{\"notificationDestination\":\"jgcyztsfmznba\",\"locations\":[\"hchqnrnrpx\"]},{\"notificationDestination\":\"uwrykqgaifmvikl\",\"locations\":[\"vkhbejdznx\"]},{\"notificationDestination\":\"dsrhnjiv\",\"locations\":[\"tnovqfzgemjdftul\"]}],\"provisioningState\":\"TransientFailure\"},\"id\":\"duceamtmc\",\"name\":\"u\",\"type\":\"m\"},{\"properties\":{\"notificationMode\":\"WebHook\",\"messageScope\":\"NotSpecified\",\"includedEvents\":[\"oknssxmojmsvpkjp\",\"vk\",\"cfzq\"],\"notificationEndpoints\":[{\"notificationDestination\":\"gtczheydb\",\"locations\":[\"hmkxmaehvbb\",\"uripltfnhtba\",\"kgxywr\",\"kpyklyhp\"]},{\"notificationDestination\":\"odpvruudlgzib\",\"locations\":[\"stgktst\",\"dxeclzedqbcvh\"]}],\"provisioningState\":\"TransientFailure\"},\"id\":\"plodqkdlwwqfbu\",\"name\":\"lkxt\",\"type\":\"qjfsmlmbtxhw\"}],\"nextLink\":\"wsrt\"}") - .toObject(NotificationRegistrationArrayResponseWithContinuation.class); - Assertions.assertEquals(NotificationMode.EVENT_HUB, model.value().get(0).properties().notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, - model.value().get(0).properties().messageScope()); - Assertions.assertEquals("tpipiwyczuhx", model.value().get(0).properties().includedEvents().get(0)); - Assertions.assertEquals("ucvpamrs", - model.value().get(0).properties().notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("zvxurisjnhny", - model.value().get(0).properties().notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.CREATING, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("wsrt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationRegistrationArrayResponseWithContinuation model - = new NotificationRegistrationArrayResponseWithContinuation() - .withValue( - Arrays.asList( - new NotificationRegistrationInner().withProperties( - new NotificationRegistrationProperties().withNotificationMode(NotificationMode.EVENT_HUB) - .withMessageScope(MessageScope.REGISTERED_SUBSCRIPTIONS) - .withIncludedEvents(Arrays.asList("tpipiwyczuhx", "cpqjlihhyu", "pskasdvlmfwdg")) - .withNotificationEndpoints(Arrays.asList( - new NotificationEndpoint().withNotificationDestination("ucvpamrs") - .withLocations(Arrays.asList("zvxurisjnhny")), - new NotificationEndpoint().withNotificationDestination("ifqjz") - .withLocations(Arrays.asList("rhublwpcesutrg", "upauut", "woqhihe")))) - .withProvisioningState(ProvisioningState.CREATING)), - new NotificationRegistrationInner().withProperties(new NotificationRegistrationProperties() - .withNotificationMode(NotificationMode.WEB_HOOK) - .withMessageScope(MessageScope.NOT_SPECIFIED) - .withIncludedEvents(Arrays.asList("ydfce", "cvlhv", "gdyftumrtwna", "jslb")) - .withNotificationEndpoints(Arrays.asList( - new NotificationEndpoint().withNotificationDestination("jgcyztsfmznba") - .withLocations(Arrays.asList("hchqnrnrpx")), - new NotificationEndpoint().withNotificationDestination("uwrykqgaifmvikl") - .withLocations(Arrays.asList("vkhbejdznx")), - new NotificationEndpoint().withNotificationDestination("dsrhnjiv") - .withLocations(Arrays.asList("tnovqfzgemjdftul")))) - .withProvisioningState(ProvisioningState.TRANSIENT_FAILURE)), - new NotificationRegistrationInner() - .withProperties( - new NotificationRegistrationProperties().withNotificationMode(NotificationMode.WEB_HOOK) - .withMessageScope(MessageScope.NOT_SPECIFIED) - .withIncludedEvents(Arrays.asList("oknssxmojmsvpkjp", "vk", "cfzq")) - .withNotificationEndpoints( - Arrays - .asList( - new NotificationEndpoint().withNotificationDestination("gtczheydb") - .withLocations(Arrays.asList("hmkxmaehvbb", "uripltfnhtba", - "kgxywr", "kpyklyhp")), - new NotificationEndpoint().withNotificationDestination("odpvruudlgzib") - .withLocations(Arrays.asList("stgktst", "dxeclzedqbcvh")))) - .withProvisioningState(ProvisioningState.TRANSIENT_FAILURE)))) - .withNextLink("wsrt"); - model = BinaryData.fromObject(model).toObject(NotificationRegistrationArrayResponseWithContinuation.class); - Assertions.assertEquals(NotificationMode.EVENT_HUB, model.value().get(0).properties().notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, - model.value().get(0).properties().messageScope()); - Assertions.assertEquals("tpipiwyczuhx", model.value().get(0).properties().includedEvents().get(0)); - Assertions.assertEquals("ucvpamrs", - model.value().get(0).properties().notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("zvxurisjnhny", - model.value().get(0).properties().notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.CREATING, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("wsrt", model.nextLink()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationInnerTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationInnerTests.java deleted file mode 100644 index 3c37af7131e1..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationInnerTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.NotificationRegistrationInner; -import com.azure.resourcemanager.providerhub.models.MessageScope; -import com.azure.resourcemanager.providerhub.models.NotificationEndpoint; -import com.azure.resourcemanager.providerhub.models.NotificationMode; -import com.azure.resourcemanager.providerhub.models.NotificationRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NotificationRegistrationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationRegistrationInner model = BinaryData.fromString( - "{\"properties\":{\"notificationMode\":\"WebHook\",\"messageScope\":\"RegisteredSubscriptions\",\"includedEvents\":[\"azpxdtnkdmkqjjl\"],\"notificationEndpoints\":[{\"notificationDestination\":\"vrkpyouaibreb\",\"locations\":[\"ysjkixqtnqttez\",\"wfff\",\"akpjpqqmtedlt\",\"mjihyeozphv\"]},{\"notificationDestination\":\"uyqncygupkvipmd\",\"locations\":[\"xqupevzhf\"]},{\"notificationDestination\":\"otxhojujby\",\"locations\":[\"mc\",\"vhixbjxy\",\"w\"]},{\"notificationDestination\":\"lrcoolsttpki\",\"locations\":[\"bnujrywvtylbf\",\"ncu\"]}],\"provisioningState\":\"Creating\"},\"id\":\"iwii\",\"name\":\"htywubxcbihwq\",\"type\":\"nfdn\"}") - .toObject(NotificationRegistrationInner.class); - Assertions.assertEquals(NotificationMode.WEB_HOOK, model.properties().notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, model.properties().messageScope()); - Assertions.assertEquals("azpxdtnkdmkqjjl", model.properties().includedEvents().get(0)); - Assertions.assertEquals("vrkpyouaibreb", - model.properties().notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("ysjkixqtnqttez", model.properties().notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.CREATING, model.properties().provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationRegistrationInner model = new NotificationRegistrationInner() - .withProperties(new NotificationRegistrationProperties().withNotificationMode(NotificationMode.WEB_HOOK) - .withMessageScope(MessageScope.REGISTERED_SUBSCRIPTIONS) - .withIncludedEvents(Arrays.asList("azpxdtnkdmkqjjl")) - .withNotificationEndpoints(Arrays.asList( - new NotificationEndpoint().withNotificationDestination("vrkpyouaibreb") - .withLocations(Arrays.asList("ysjkixqtnqttez", "wfff", "akpjpqqmtedlt", "mjihyeozphv")), - new NotificationEndpoint().withNotificationDestination("uyqncygupkvipmd") - .withLocations(Arrays.asList("xqupevzhf")), - new NotificationEndpoint().withNotificationDestination("otxhojujby") - .withLocations(Arrays.asList("mc", "vhixbjxy", "w")), - new NotificationEndpoint().withNotificationDestination("lrcoolsttpki") - .withLocations(Arrays.asList("bnujrywvtylbf", "ncu")))) - .withProvisioningState(ProvisioningState.CREATING)); - model = BinaryData.fromObject(model).toObject(NotificationRegistrationInner.class); - Assertions.assertEquals(NotificationMode.WEB_HOOK, model.properties().notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, model.properties().messageScope()); - Assertions.assertEquals("azpxdtnkdmkqjjl", model.properties().includedEvents().get(0)); - Assertions.assertEquals("vrkpyouaibreb", - model.properties().notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("ysjkixqtnqttez", model.properties().notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.CREATING, model.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesAutoGeneratedTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesAutoGeneratedTests.java deleted file mode 100644 index 9e196809569f..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesAutoGeneratedTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.MessageScope; -import com.azure.resourcemanager.providerhub.models.NotificationEndpoint; -import com.azure.resourcemanager.providerhub.models.NotificationMode; -import com.azure.resourcemanager.providerhub.models.NotificationRegistrationPropertiesAutoGenerated; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NotificationRegistrationPropertiesAutoGeneratedTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationRegistrationPropertiesAutoGenerated model = BinaryData.fromString( - "{\"notificationMode\":\"EventHub\",\"messageScope\":\"NotSpecified\",\"includedEvents\":[\"kyzirtxdyux\",\"ejnt\",\"sewgioilqukr\"],\"notificationEndpoints\":[{\"notificationDestination\":\"qmi\",\"locations\":[\"orgguf\",\"yaomtb\"]},{\"notificationDestination\":\"havgrvk\",\"locations\":[\"vjzhpjbib\",\"jmfxumvf\",\"luyovwxnbkfezzx\",\"cy\"]},{\"notificationDestination\":\"zdgiruj\",\"locations\":[\"omvzzbtd\",\"qvpn\",\"yujviylwdshfssn\"]}],\"provisioningState\":\"Accepted\"}") - .toObject(NotificationRegistrationPropertiesAutoGenerated.class); - Assertions.assertEquals(NotificationMode.EVENT_HUB, model.notificationMode()); - Assertions.assertEquals(MessageScope.NOT_SPECIFIED, model.messageScope()); - Assertions.assertEquals("kyzirtxdyux", model.includedEvents().get(0)); - Assertions.assertEquals("qmi", model.notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("orgguf", model.notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.ACCEPTED, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationRegistrationPropertiesAutoGenerated model - = new NotificationRegistrationPropertiesAutoGenerated().withNotificationMode(NotificationMode.EVENT_HUB) - .withMessageScope(MessageScope.NOT_SPECIFIED) - .withIncludedEvents(Arrays.asList("kyzirtxdyux", "ejnt", "sewgioilqukr")) - .withNotificationEndpoints(Arrays.asList( - new NotificationEndpoint().withNotificationDestination("qmi") - .withLocations(Arrays.asList("orgguf", "yaomtb")), - new NotificationEndpoint().withNotificationDestination("havgrvk") - .withLocations(Arrays.asList("vjzhpjbib", "jmfxumvf", "luyovwxnbkfezzx", "cy")), - new NotificationEndpoint().withNotificationDestination("zdgiruj") - .withLocations(Arrays.asList("omvzzbtd", "qvpn", "yujviylwdshfssn")))) - .withProvisioningState(ProvisioningState.ACCEPTED); - model = BinaryData.fromObject(model).toObject(NotificationRegistrationPropertiesAutoGenerated.class); - Assertions.assertEquals(NotificationMode.EVENT_HUB, model.notificationMode()); - Assertions.assertEquals(MessageScope.NOT_SPECIFIED, model.messageScope()); - Assertions.assertEquals("kyzirtxdyux", model.includedEvents().get(0)); - Assertions.assertEquals("qmi", model.notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("orgguf", model.notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.ACCEPTED, model.provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesTests.java deleted file mode 100644 index 01467a7dac77..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationPropertiesTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.MessageScope; -import com.azure.resourcemanager.providerhub.models.NotificationEndpoint; -import com.azure.resourcemanager.providerhub.models.NotificationMode; -import com.azure.resourcemanager.providerhub.models.NotificationRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NotificationRegistrationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationRegistrationProperties model = BinaryData.fromString( - "{\"notificationMode\":\"EventHub\",\"messageScope\":\"RegisteredSubscriptions\",\"includedEvents\":[\"goihx\",\"mwctondzjluudfd\",\"wggytsbwtovvt\",\"seinqfiuf\"],\"notificationEndpoints\":[{\"notificationDestination\":\"pirgnepttwq\",\"locations\":[\"iffcdmqnrojlpijn\",\"rxfrddhc\",\"atiz\"]},{\"notificationDestination\":\"onasxifto\",\"locations\":[\"zh\",\"tw\",\"sgogczhonnxk\",\"lgnyhmo\"]},{\"notificationDestination\":\"xkk\",\"locations\":[\"rrghxjbdhqxvcxgf\"]},{\"notificationDestination\":\"dsofbshrns\",\"locations\":[\"swdvzyybycnun\",\"jsrtk\"]}],\"provisioningState\":\"NotSpecified\"}") - .toObject(NotificationRegistrationProperties.class); - Assertions.assertEquals(NotificationMode.EVENT_HUB, model.notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, model.messageScope()); - Assertions.assertEquals("goihx", model.includedEvents().get(0)); - Assertions.assertEquals("pirgnepttwq", model.notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("iffcdmqnrojlpijn", model.notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationRegistrationProperties model - = new NotificationRegistrationProperties().withNotificationMode(NotificationMode.EVENT_HUB) - .withMessageScope(MessageScope.REGISTERED_SUBSCRIPTIONS) - .withIncludedEvents(Arrays.asList("goihx", "mwctondzjluudfd", "wggytsbwtovvt", "seinqfiuf")) - .withNotificationEndpoints(Arrays.asList( - new NotificationEndpoint().withNotificationDestination("pirgnepttwq") - .withLocations(Arrays.asList("iffcdmqnrojlpijn", "rxfrddhc", "atiz")), - new NotificationEndpoint().withNotificationDestination("onasxifto") - .withLocations(Arrays.asList("zh", "tw", "sgogczhonnxk", "lgnyhmo")), - new NotificationEndpoint().withNotificationDestination("xkk") - .withLocations(Arrays.asList("rrghxjbdhqxvcxgf")), - new NotificationEndpoint().withNotificationDestination("dsofbshrns") - .withLocations(Arrays.asList("swdvzyybycnun", "jsrtk")))) - .withProvisioningState(ProvisioningState.NOT_SPECIFIED); - model = BinaryData.fromObject(model).toObject(NotificationRegistrationProperties.class); - Assertions.assertEquals(NotificationMode.EVENT_HUB, model.notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, model.messageScope()); - Assertions.assertEquals("goihx", model.includedEvents().get(0)); - Assertions.assertEquals("pirgnepttwq", model.notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("iffcdmqnrojlpijn", model.notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index c5257f839792..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.MessageScope; -import com.azure.resourcemanager.providerhub.models.NotificationEndpoint; -import com.azure.resourcemanager.providerhub.models.NotificationMode; -import com.azure.resourcemanager.providerhub.models.NotificationRegistration; -import com.azure.resourcemanager.providerhub.models.NotificationRegistrationProperties; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NotificationRegistrationsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"notificationMode\":\"NotSpecified\",\"messageScope\":\"RegisteredSubscriptions\",\"includedEvents\":[\"mnaoy\"],\"notificationEndpoints\":[{\"notificationDestination\":\"oe\",\"locations\":[\"ankltytm\",\"droznn\",\"drlktg\",\"csgguxhemlw\"]},{\"notificationDestination\":\"ae\",\"locations\":[\"gfbukklelss\",\"blycsxzujksr\",\"smdesqplpvmjcd\",\"ewbidyvteowxv\"]},{\"notificationDestination\":\"iudeu\",\"locations\":[\"xzecpaxwkufykhvu\"]}],\"provisioningState\":\"MovingResources\"},\"id\":\"pmru\",\"name\":\"znabaobns\",\"type\":\"ujdjltymkmvg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NotificationRegistration response = manager.notificationRegistrations() - .define("uvqejosovyrrle") - .withExistingProviderRegistration("ndcbrwi") - .withProperties(new NotificationRegistrationProperties().withNotificationMode(NotificationMode.EVENT_HUB) - .withMessageScope(MessageScope.REGISTERED_SUBSCRIPTIONS) - .withIncludedEvents(Arrays.asList("ljqobbpihehcecyb", "rqbrjbbmpxdlvyk", "rexcrseqwjksghu")) - .withNotificationEndpoints(Arrays.asList( - new NotificationEndpoint().withNotificationDestination("xog") - .withLocations(Arrays.asList("svoujkxi")), - new NotificationEndpoint().withNotificationDestination("afhrkmdyomk") - .withLocations(Arrays.asList("vfb")), - new NotificationEndpoint().withNotificationDestination("y") - .withLocations(Arrays.asList("pwpgddei", "awzovgkk", "muikjcjcaztbws", "sqowxwc")))) - .withProvisioningState(ProvisioningState.ROLLOUT_IN_PROGRESS)) - .create(); - - Assertions.assertEquals(NotificationMode.NOT_SPECIFIED, response.properties().notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, response.properties().messageScope()); - Assertions.assertEquals("mnaoy", response.properties().includedEvents().get(0)); - Assertions.assertEquals("oe", response.properties().notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("ankltytm", response.properties().notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.MOVING_RESOURCES, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteByResourceGroupWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index f3064b66a6e7..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NotificationRegistrationsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.notificationRegistrations() - .deleteByResourceGroupWithResponse("zvlnsnnjz", "pafolp", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetWithResponseMockTests.java deleted file mode 100644 index b7c1b8d6aba2..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsGetWithResponseMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.MessageScope; -import com.azure.resourcemanager.providerhub.models.NotificationMode; -import com.azure.resourcemanager.providerhub.models.NotificationRegistration; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NotificationRegistrationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"notificationMode\":\"EventHub\",\"messageScope\":\"RegisteredSubscriptions\",\"includedEvents\":[\"ojuidjpuuyjucej\",\"kzoeovvtzejetj\",\"ln\"],\"notificationEndpoints\":[{\"notificationDestination\":\"juzkdbqz\",\"locations\":[\"rzvh\",\"jwtrhtgvgzp\",\"rrkolawjmjs\",\"wro\"]}],\"provisioningState\":\"Running\"},\"id\":\"xfzzzwyjafitlhgu\",\"name\":\"nuchlgmltxdwhmo\",\"type\":\"us\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NotificationRegistration response = manager.notificationRegistrations() - .getWithResponse("jmvl", "yzgib", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(NotificationMode.EVENT_HUB, response.properties().notificationMode()); - Assertions.assertEquals(MessageScope.REGISTERED_SUBSCRIPTIONS, response.properties().messageScope()); - Assertions.assertEquals("ojuidjpuuyjucej", response.properties().includedEvents().get(0)); - Assertions.assertEquals("juzkdbqz", - response.properties().notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("rzvh", response.properties().notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.RUNNING, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationMockTests.java deleted file mode 100644 index bac780b40162..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/NotificationRegistrationsListByProviderRegistrationMockTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.MessageScope; -import com.azure.resourcemanager.providerhub.models.NotificationMode; -import com.azure.resourcemanager.providerhub.models.NotificationRegistration; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NotificationRegistrationsListByProviderRegistrationMockTests { - @Test - public void testListByProviderRegistration() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"notificationMode\":\"NotSpecified\",\"messageScope\":\"NotSpecified\",\"includedEvents\":[\"lejchcsr\"],\"notificationEndpoints\":[{\"notificationDestination\":\"mzlanru\",\"locations\":[\"vnphc\",\"zqtpjhmq\"]},{\"notificationDestination\":\"v\",\"locations\":[\"aiwdcxsmlzzhz\",\"txetlgydl\",\"qvlnnpxybafiqgea\",\"rbgjekglkl\"]},{\"notificationDestination\":\"ulidwc\",\"locations\":[\"zegjonfhjirwgdn\",\"z\"]},{\"notificationDestination\":\"fkspzhzmtksjci\",\"locations\":[\"gsxcdgljplkeua\",\"htomflrytswfp\",\"mdgycxn\"]}],\"provisioningState\":\"Deleting\"},\"id\":\"whqjjyslurlpshhk\",\"name\":\"pedwqsl\",\"type\":\"rhmpqvwwsk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.notificationRegistrations() - .listByProviderRegistration("mwamxqzragpgdph", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(NotificationMode.NOT_SPECIFIED, - response.iterator().next().properties().notificationMode()); - Assertions.assertEquals(MessageScope.NOT_SPECIFIED, response.iterator().next().properties().messageScope()); - Assertions.assertEquals("lejchcsr", response.iterator().next().properties().includedEvents().get(0)); - Assertions.assertEquals("mzlanru", - response.iterator().next().properties().notificationEndpoints().get(0).notificationDestination()); - Assertions.assertEquals("vnphc", - response.iterator().next().properties().notificationEndpoints().get(0).locations().get(0)); - Assertions.assertEquals(ProvisioningState.DELETING, - response.iterator().next().properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsContentInnerTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsContentInnerTests.java deleted file mode 100644 index ad0a52e11ae9..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsContentInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsContentInner; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationsContentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsContentInner model = BinaryData.fromString( - "{\"properties\":{\"name\":\"ttsttktlahbqact\",\"isDataAction\":true,\"origin\":\"NotSpecified\",\"display\":{\"provider\":\"kxitmmqtgqqqxhr\",\"resource\":\"xrxc\",\"operation\":\"juisavokqdzf\",\"description\":\"azivjlfrqttbajl\"},\"actionType\":\"NotSpecified\",\"properties\":\"datawxyiopidkqq\"},\"id\":\"kuvscxkdm\",\"name\":\"igovi\",\"type\":\"rxkpmloazuruoc\"}") - .toObject(OperationsContentInner.class); - Assertions.assertEquals("ttsttktlahbqact", model.namePropertiesName()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals(OperationOrigins.NOT_SPECIFIED, model.origin()); - Assertions.assertEquals("kxitmmqtgqqqxhr", model.display().provider()); - Assertions.assertEquals("xrxc", model.display().resource()); - Assertions.assertEquals("juisavokqdzf", model.display().operation()); - Assertions.assertEquals("azivjlfrqttbajl", model.display().description()); - Assertions.assertEquals(OperationActionType.NOT_SPECIFIED, model.actionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsContentInner model = new OperationsContentInner().withNamePropertiesName("ttsttktlahbqact") - .withIsDataAction(true) - .withOrigin(OperationOrigins.NOT_SPECIFIED) - .withDisplay(new OperationsDefinitionDisplay().withProvider("kxitmmqtgqqqxhr") - .withResource("xrxc") - .withOperation("juisavokqdzf") - .withDescription("azivjlfrqttbajl")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("datawxyiopidkqq"); - model = BinaryData.fromObject(model).toObject(OperationsContentInner.class); - Assertions.assertEquals("ttsttktlahbqact", model.namePropertiesName()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals(OperationOrigins.NOT_SPECIFIED, model.origin()); - Assertions.assertEquals("kxitmmqtgqqqxhr", model.display().provider()); - Assertions.assertEquals("xrxc", model.display().resource()); - Assertions.assertEquals("juisavokqdzf", model.display().operation()); - Assertions.assertEquals("azivjlfrqttbajl", model.display().description()); - Assertions.assertEquals(OperationActionType.NOT_SPECIFIED, model.actionType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index cec7cbe914e6..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsContent; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import com.azure.resourcemanager.providerhub.models.OperationsPutContent; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"name\":\"dzsylollgtrczz\",\"isDataAction\":true,\"origin\":\"System\",\"display\":{\"provider\":\"ji\",\"resource\":\"p\",\"operation\":\"uaurkihcir\",\"description\":\"defxrdc\"},\"actionType\":\"Internal\",\"properties\":\"datakkjanurnnqbnqbp\"},\"id\":\"zxqltgrdogypx\",\"name\":\"x\",\"type\":\"bfihw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationsContent response = manager.operations() - .createOrUpdateWithResponse("mguaml", - new OperationsPutContent().withContents(Arrays.asList( - new OperationsDefinitionInner().withName("l") - .withIsDataAction(true) - .withOrigin(OperationOrigins.SYSTEM) - .withDisplay(new OperationsDefinitionDisplay().withProvider("lzgaufcshhvnew") - .withResource("nxkympqanxrjk") - .withOperation("xtwbta") - .withDescription("ypnyghshxc")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("datagmnsghpxy"), - new OperationsDefinitionInner().withName("phdrw") - .withIsDataAction(false) - .withOrigin(OperationOrigins.USER) - .withDisplay(new OperationsDefinitionDisplay().withProvider("yomacluzvxnqm") - .withResource("rpqpd") - .withOperation("wmkoisq") - .withDescription("ssffxuifmc")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("databkdq"))), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dzsylollgtrczz", response.namePropertiesName()); - Assertions.assertEquals(true, response.isDataAction()); - Assertions.assertEquals(OperationOrigins.SYSTEM, response.origin()); - Assertions.assertEquals("ji", response.display().provider()); - Assertions.assertEquals("p", response.display().resource()); - Assertions.assertEquals("uaurkihcir", response.display().operation()); - Assertions.assertEquals("defxrdc", response.display().description()); - Assertions.assertEquals(OperationActionType.INTERNAL, response.actionType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionArrayResponseWithContinuationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionArrayResponseWithContinuationTests.java deleted file mode 100644 index 499a6b1182bb..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionArrayResponseWithContinuationTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionArrayResponseWithContinuation; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationsDefinitionArrayResponseWithContinuationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsDefinitionArrayResponseWithContinuation model = BinaryData.fromString( - "{\"value\":[{\"name\":\"oezbrhubsk\",\"isDataAction\":false,\"origin\":\"System\",\"display\":{\"provider\":\"oookkqfq\",\"resource\":\"bvleorfmluiqtqzf\",\"operation\":\"vyvnqqyb\",\"description\":\"ryeu\"},\"actionType\":\"NotSpecified\",\"properties\":\"dataqabqgzslesjcb\"},{\"name\":\"ernntiewdjcvbquw\",\"isDataAction\":false,\"origin\":\"NotSpecified\",\"display\":{\"provider\":\"agohbuff\",\"resource\":\"mrqemvvhmx\",\"operation\":\"drjf\",\"description\":\"tac\"},\"actionType\":\"NotSpecified\",\"properties\":\"datavewzcj\"},{\"name\":\"nmwcpmgu\",\"isDataAction\":true,\"origin\":\"NotSpecified\",\"display\":{\"provider\":\"ufactk\",\"resource\":\"hzovaj\",\"operation\":\"ziuxxpshnee\",\"description\":\"ulfgslqu\"},\"actionType\":\"Internal\",\"properties\":\"datalenrd\"}],\"nextLink\":\"tujbazpju\"}") - .toObject(OperationsDefinitionArrayResponseWithContinuation.class); - Assertions.assertEquals("oezbrhubsk", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals(OperationOrigins.SYSTEM, model.value().get(0).origin()); - Assertions.assertEquals("oookkqfq", model.value().get(0).display().provider()); - Assertions.assertEquals("bvleorfmluiqtqzf", model.value().get(0).display().resource()); - Assertions.assertEquals("vyvnqqyb", model.value().get(0).display().operation()); - Assertions.assertEquals("ryeu", model.value().get(0).display().description()); - Assertions.assertEquals(OperationActionType.NOT_SPECIFIED, model.value().get(0).actionType()); - Assertions.assertEquals("tujbazpju", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsDefinitionArrayResponseWithContinuation model - = new OperationsDefinitionArrayResponseWithContinuation().withValue(Arrays.asList( - new OperationsDefinitionInner().withName("oezbrhubsk") - .withIsDataAction(false) - .withOrigin(OperationOrigins.SYSTEM) - .withDisplay(new OperationsDefinitionDisplay().withProvider("oookkqfq") - .withResource("bvleorfmluiqtqzf") - .withOperation("vyvnqqyb") - .withDescription("ryeu")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("dataqabqgzslesjcb"), - new OperationsDefinitionInner().withName("ernntiewdjcvbquw") - .withIsDataAction(false) - .withOrigin(OperationOrigins.NOT_SPECIFIED) - .withDisplay(new OperationsDefinitionDisplay().withProvider("agohbuff") - .withResource("mrqemvvhmx") - .withOperation("drjf") - .withDescription("tac")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("datavewzcj"), - new OperationsDefinitionInner().withName("nmwcpmgu") - .withIsDataAction(true) - .withOrigin(OperationOrigins.NOT_SPECIFIED) - .withDisplay(new OperationsDefinitionDisplay().withProvider("ufactk") - .withResource("hzovaj") - .withOperation("ziuxxpshnee") - .withDescription("ulfgslqu")) - .withActionType(OperationActionType.INTERNAL) - .withProperties("datalenrd"))) - .withNextLink("tujbazpju"); - model = BinaryData.fromObject(model).toObject(OperationsDefinitionArrayResponseWithContinuation.class); - Assertions.assertEquals("oezbrhubsk", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals(OperationOrigins.SYSTEM, model.value().get(0).origin()); - Assertions.assertEquals("oookkqfq", model.value().get(0).display().provider()); - Assertions.assertEquals("bvleorfmluiqtqzf", model.value().get(0).display().resource()); - Assertions.assertEquals("vyvnqqyb", model.value().get(0).display().operation()); - Assertions.assertEquals("ryeu", model.value().get(0).display().description()); - Assertions.assertEquals(OperationActionType.NOT_SPECIFIED, model.value().get(0).actionType()); - Assertions.assertEquals("tujbazpju", model.nextLink()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionDisplayTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionDisplayTests.java deleted file mode 100644 index bb0d8cadecd0..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionDisplayTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationsDefinitionDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsDefinitionDisplay model = BinaryData.fromString( - "{\"provider\":\"auorsukokw\",\"resource\":\"qplhlvnu\",\"operation\":\"epzl\",\"description\":\"phwzsoldweyuqdu\"}") - .toObject(OperationsDefinitionDisplay.class); - Assertions.assertEquals("auorsukokw", model.provider()); - Assertions.assertEquals("qplhlvnu", model.resource()); - Assertions.assertEquals("epzl", model.operation()); - Assertions.assertEquals("phwzsoldweyuqdu", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsDefinitionDisplay model = new OperationsDefinitionDisplay().withProvider("auorsukokw") - .withResource("qplhlvnu") - .withOperation("epzl") - .withDescription("phwzsoldweyuqdu"); - model = BinaryData.fromObject(model).toObject(OperationsDefinitionDisplay.class); - Assertions.assertEquals("auorsukokw", model.provider()); - Assertions.assertEquals("qplhlvnu", model.resource()); - Assertions.assertEquals("epzl", model.operation()); - Assertions.assertEquals("phwzsoldweyuqdu", model.description()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionInnerTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionInnerTests.java deleted file mode 100644 index 2edd5d95cbef..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDefinitionInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationsDefinitionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsDefinitionInner model = BinaryData.fromString( - "{\"name\":\"hminyflnorwmduv\",\"isDataAction\":false,\"origin\":\"NotSpecified\",\"display\":{\"provider\":\"xwmygdxpgpqc\",\"resource\":\"isze\",\"operation\":\"nnbj\",\"description\":\"rxgibbd\"},\"actionType\":\"Internal\",\"properties\":\"datanfo\"}") - .toObject(OperationsDefinitionInner.class); - Assertions.assertEquals("hminyflnorwmduv", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals(OperationOrigins.NOT_SPECIFIED, model.origin()); - Assertions.assertEquals("xwmygdxpgpqc", model.display().provider()); - Assertions.assertEquals("isze", model.display().resource()); - Assertions.assertEquals("nnbj", model.display().operation()); - Assertions.assertEquals("rxgibbd", model.display().description()); - Assertions.assertEquals(OperationActionType.INTERNAL, model.actionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsDefinitionInner model = new OperationsDefinitionInner().withName("hminyflnorwmduv") - .withIsDataAction(false) - .withOrigin(OperationOrigins.NOT_SPECIFIED) - .withDisplay(new OperationsDefinitionDisplay().withProvider("xwmygdxpgpqc") - .withResource("isze") - .withOperation("nnbj") - .withDescription("rxgibbd")) - .withActionType(OperationActionType.INTERNAL) - .withProperties("datanfo"); - model = BinaryData.fromObject(model).toObject(OperationsDefinitionInner.class); - Assertions.assertEquals("hminyflnorwmduv", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals(OperationOrigins.NOT_SPECIFIED, model.origin()); - Assertions.assertEquals("xwmygdxpgpqc", model.display().provider()); - Assertions.assertEquals("isze", model.display().resource()); - Assertions.assertEquals("nnbj", model.display().operation()); - Assertions.assertEquals("rxgibbd", model.display().description()); - Assertions.assertEquals(OperationActionType.INTERNAL, model.actionType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteWithResponseMockTests.java deleted file mode 100644 index 67393bb03ac6..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.operations().deleteWithResponse("hvcta", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDisplayDefinitionTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDisplayDefinitionTests.java deleted file mode 100644 index 24757107255b..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsDisplayDefinitionTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.OperationsDisplayDefinition; -import org.junit.jupiter.api.Assertions; - -public final class OperationsDisplayDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsDisplayDefinition model = BinaryData.fromString( - "{\"provider\":\"vmnnrw\",\"resource\":\"biorktal\",\"operation\":\"wjhhgdnhxmsivf\",\"description\":\"miloxggdufiqndie\"}") - .toObject(OperationsDisplayDefinition.class); - Assertions.assertEquals("vmnnrw", model.provider()); - Assertions.assertEquals("biorktal", model.resource()); - Assertions.assertEquals("wjhhgdnhxmsivf", model.operation()); - Assertions.assertEquals("miloxggdufiqndie", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsDisplayDefinition model = new OperationsDisplayDefinition().withProvider("vmnnrw") - .withResource("biorktal") - .withOperation("wjhhgdnhxmsivf") - .withDescription("miloxggdufiqndie"); - model = BinaryData.fromObject(model).toObject(OperationsDisplayDefinition.class); - Assertions.assertEquals("vmnnrw", model.provider()); - Assertions.assertEquals("biorktal", model.resource()); - Assertions.assertEquals("wjhhgdnhxmsivf", model.operation()); - Assertions.assertEquals("miloxggdufiqndie", model.description()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationWithResponseMockTests.java deleted file mode 100644 index e2b940a9b115..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListByProviderRegistrationWithResponseMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinition; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListByProviderRegistrationWithResponseMockTests { - @Test - public void testListByProviderRegistrationWithResponse() throws Exception { - String responseStr - = "[{\"name\":\"ptjgwdt\",\"isDataAction\":true,\"origin\":\"NotSpecified\",\"display\":{\"provider\":\"nblwphqlkcc\",\"resource\":\"zgygqwahoiulwgni\",\"operation\":\"prglvawuwzduf\",\"description\":\"pivlsbbjpm\"},\"actionType\":\"Internal\",\"properties\":\"datamifoxxkub\"},{\"name\":\"phavpmhbrb\",\"isDataAction\":true,\"origin\":\"System\",\"display\":{\"provider\":\"vpbbt\",\"resource\":\"efjokn\",\"operation\":\"sqyzqedikdfr\",\"description\":\"biqmrjgei\"},\"actionType\":\"NotSpecified\",\"properties\":\"dataggwfiwz\"},{\"name\":\"xmjpbyep\",\"isDataAction\":false,\"origin\":\"User\",\"display\":{\"provider\":\"ljvrcmyfqipgxhnp\",\"resource\":\"myqwcab\",\"operation\":\"nuilee\",\"description\":\"aswlp\"},\"actionType\":\"NotSpecified\",\"properties\":\"datarmfjlrxw\"},{\"name\":\"oauk\",\"isDataAction\":false,\"origin\":\"System\",\"display\":{\"provider\":\"isizm\",\"resource\":\"a\",\"operation\":\"dsxjwuivedw\",\"description\":\"gyeewxeiq\"},\"actionType\":\"Internal\",\"properties\":\"datag\"}]"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = manager.operations() - .listByProviderRegistrationWithResponse("owlxte", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ptjgwdt", response.get(0).name()); - Assertions.assertEquals(true, response.get(0).isDataAction()); - Assertions.assertEquals(OperationOrigins.NOT_SPECIFIED, response.get(0).origin()); - Assertions.assertEquals("nblwphqlkcc", response.get(0).display().provider()); - Assertions.assertEquals("zgygqwahoiulwgni", response.get(0).display().resource()); - Assertions.assertEquals("prglvawuwzduf", response.get(0).display().operation()); - Assertions.assertEquals("pivlsbbjpm", response.get(0).display().description()); - Assertions.assertEquals(OperationActionType.INTERNAL, response.get(0).actionType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListMockTests.java deleted file mode 100644 index d404c223aa28..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsListMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinition; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ihywartspph\",\"isDataAction\":true,\"origin\":\"User\",\"display\":{\"provider\":\"kxdssjpemmucfxh\",\"resource\":\"kkflrmymyincqlhr\",\"operation\":\"s\",\"description\":\"sl\"},\"actionType\":\"Internal\",\"properties\":\"dataovgqcgxuugqkctot\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ihywartspph", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals(OperationOrigins.USER, response.iterator().next().origin()); - Assertions.assertEquals("kxdssjpemmucfxh", response.iterator().next().display().provider()); - Assertions.assertEquals("kkflrmymyincqlhr", response.iterator().next().display().resource()); - Assertions.assertEquals("s", response.iterator().next().display().operation()); - Assertions.assertEquals("sl", response.iterator().next().display().description()); - Assertions.assertEquals(OperationActionType.INTERNAL, response.iterator().next().actionType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsPutContentTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsPutContentTests.java deleted file mode 100644 index 5d960aebcfca..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/OperationsPutContentTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay; -import com.azure.resourcemanager.providerhub.models.OperationsPutContent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationsPutContentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsPutContent model = BinaryData.fromString( - "{\"contents\":[{\"name\":\"ao\",\"isDataAction\":true,\"origin\":\"System\",\"display\":{\"provider\":\"cyyysfgdot\",\"resource\":\"ubiipuipwoqonma\",\"operation\":\"jeknizshq\",\"description\":\"cimpevfg\"},\"actionType\":\"NotSpecified\",\"properties\":\"datarilbywdx\"},{\"name\":\"miccwrwfscjfnyn\",\"isDataAction\":false,\"origin\":\"NotSpecified\",\"display\":{\"provider\":\"i\",\"resource\":\"dvoqyt\",\"operation\":\"byowbblgyavutp\",\"description\":\"hjoxo\"},\"actionType\":\"NotSpecified\",\"properties\":\"dataksbpimlqoljx\"},{\"name\":\"cgxxlxs\",\"isDataAction\":true,\"origin\":\"NotSpecified\",\"display\":{\"provider\":\"izqzdwlvwlyou\",\"resource\":\"fgfb\",\"operation\":\"jub\",\"description\":\"yhgk\"},\"actionType\":\"NotSpecified\",\"properties\":\"datasgow\"}]}") - .toObject(OperationsPutContent.class); - Assertions.assertEquals("ao", model.contents().get(0).name()); - Assertions.assertEquals(true, model.contents().get(0).isDataAction()); - Assertions.assertEquals(OperationOrigins.SYSTEM, model.contents().get(0).origin()); - Assertions.assertEquals("cyyysfgdot", model.contents().get(0).display().provider()); - Assertions.assertEquals("ubiipuipwoqonma", model.contents().get(0).display().resource()); - Assertions.assertEquals("jeknizshq", model.contents().get(0).display().operation()); - Assertions.assertEquals("cimpevfg", model.contents().get(0).display().description()); - Assertions.assertEquals(OperationActionType.NOT_SPECIFIED, model.contents().get(0).actionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsPutContent model = new OperationsPutContent().withContents(Arrays.asList( - new OperationsDefinitionInner().withName("ao") - .withIsDataAction(true) - .withOrigin(OperationOrigins.SYSTEM) - .withDisplay(new OperationsDefinitionDisplay().withProvider("cyyysfgdot") - .withResource("ubiipuipwoqonma") - .withOperation("jeknizshq") - .withDescription("cimpevfg")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("datarilbywdx"), - new OperationsDefinitionInner().withName("miccwrwfscjfnyn") - .withIsDataAction(false) - .withOrigin(OperationOrigins.NOT_SPECIFIED) - .withDisplay(new OperationsDefinitionDisplay().withProvider("i") - .withResource("dvoqyt") - .withOperation("byowbblgyavutp") - .withDescription("hjoxo")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("dataksbpimlqoljx"), - new OperationsDefinitionInner().withName("cgxxlxs") - .withIsDataAction(true) - .withOrigin(OperationOrigins.NOT_SPECIFIED) - .withDisplay(new OperationsDefinitionDisplay().withProvider("izqzdwlvwlyou") - .withResource("fgfb") - .withOperation("jub") - .withDescription("yhgk")) - .withActionType(OperationActionType.NOT_SPECIFIED) - .withProperties("datasgow"))); - model = BinaryData.fromObject(model).toObject(OperationsPutContent.class); - Assertions.assertEquals("ao", model.contents().get(0).name()); - Assertions.assertEquals(true, model.contents().get(0).isDataAction()); - Assertions.assertEquals(OperationOrigins.SYSTEM, model.contents().get(0).origin()); - Assertions.assertEquals("cyyysfgdot", model.contents().get(0).display().provider()); - Assertions.assertEquals("ubiipuipwoqonma", model.contents().get(0).display().resource()); - Assertions.assertEquals("jeknizshq", model.contents().get(0).display().operation()); - Assertions.assertEquals("cimpevfg", model.contents().get(0).display().description()); - Assertions.assertEquals(OperationActionType.NOT_SPECIFIED, model.contents().get(0).actionType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderHubMetadataProviderAuthenticationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderHubMetadataProviderAuthenticationTests.java deleted file mode 100644 index d91557dde7df..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderHubMetadataProviderAuthenticationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ProviderHubMetadataProviderAuthentication; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProviderHubMetadataProviderAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProviderHubMetadataProviderAuthentication model - = BinaryData.fromString("{\"allowedAudiences\":[\"dkvwrwjfe\",\"snhu\",\"je\"]}") - .toObject(ProviderHubMetadataProviderAuthentication.class); - Assertions.assertEquals("dkvwrwjfe", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProviderHubMetadataProviderAuthentication model = new ProviderHubMetadataProviderAuthentication() - .withAllowedAudiences(Arrays.asList("dkvwrwjfe", "snhu", "je")); - model = BinaryData.fromObject(model).toObject(ProviderHubMetadataProviderAuthentication.class); - Assertions.assertEquals("dkvwrwjfe", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java deleted file mode 100644 index d8b5f2bffc86..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications; -import com.azure.resourcemanager.providerhub.models.SubscriptionNotificationOperation; -import com.azure.resourcemanager.providerhub.models.SubscriptionStateOverrideAction; -import com.azure.resourcemanager.providerhub.models.SubscriptionTransitioningState; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications model = BinaryData.fromString( - "{\"subscriptionStateOverrideActions\":[{\"state\":\"Registered\",\"action\":\"UndoSoftDelete\"}],\"softDeleteTTL\":\"PT48H21M31S\"}") - .toObject(ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.class); - Assertions.assertEquals(SubscriptionTransitioningState.REGISTERED, - model.subscriptionStateOverrideActions().get(0).state()); - Assertions.assertEquals(SubscriptionNotificationOperation.UNDO_SOFT_DELETE, - model.subscriptionStateOverrideActions().get(0).action()); - Assertions.assertEquals(Duration.parse("PT48H21M31S"), model.softDeleteTtl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications model - = new ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications() - .withSubscriptionStateOverrideActions(Arrays - .asList(new SubscriptionStateOverrideAction().withState(SubscriptionTransitioningState.REGISTERED) - .withAction(SubscriptionNotificationOperation.UNDO_SOFT_DELETE))) - .withSoftDeleteTtl(Duration.parse("PT48H21M31S")); - model = BinaryData.fromObject(model) - .toObject(ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.class); - Assertions.assertEquals(SubscriptionTransitioningState.REGISTERED, - model.subscriptionStateOverrideActions().get(0).state()); - Assertions.assertEquals(SubscriptionNotificationOperation.UNDO_SOFT_DELETE, - model.subscriptionStateOverrideActions().get(0).action()); - Assertions.assertEquals(Duration.parse("PT48H21M31S"), model.softDeleteTtl()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteWithResponseMockTests.java deleted file mode 100644 index 14c30529a4e2..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ProviderRegistrationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.providerRegistrations().deleteWithResponse("cbq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsWithResponseMockTests.java deleted file mode 100644 index 09e877951aac..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ProviderRegistrationsGenerateOperationsWithResponseMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.OperationActionType; -import com.azure.resourcemanager.providerhub.models.OperationOrigins; -import com.azure.resourcemanager.providerhub.models.OperationsDefinition; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ProviderRegistrationsGenerateOperationsWithResponseMockTests { - @Test - public void testGenerateOperationsWithResponse() throws Exception { - String responseStr - = "[{\"name\":\"ptysprq\",\"isDataAction\":true,\"origin\":\"System\",\"display\":{\"provider\":\"ojpslsvjgpliufi\",\"resource\":\"woyxqvapcohhou\",\"operation\":\"qpqojxcxzrzd\",\"description\":\"gdzbenr\"},\"actionType\":\"Internal\",\"properties\":\"datawetzqddtjwfljh\"},{\"name\":\"namtuatmzw\",\"isDataAction\":true,\"origin\":\"System\",\"display\":{\"provider\":\"qtjzmizvgbg\",\"resource\":\"tzuuvb\",\"operation\":\"ngrebwg\",\"description\":\"ahttzlswvajqfut\"},\"actionType\":\"NotSpecified\",\"properties\":\"dataqzasunwqrjzfrgqh\"},{\"name\":\"ohcmbu\",\"isDataAction\":true,\"origin\":\"User\",\"display\":{\"provider\":\"ohmbpyr\",\"resource\":\"xameblydyvkfkm\",\"operation\":\"ocxnehvsmtodl\",\"description\":\"pyapucygvoav\"},\"actionType\":\"NotSpecified\",\"properties\":\"datasxlghieegjlg\"}]"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = manager.providerRegistrations() - .generateOperationsWithResponse("jklinh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ptysprq", response.get(0).name()); - Assertions.assertEquals(true, response.get(0).isDataAction()); - Assertions.assertEquals(OperationOrigins.SYSTEM, response.get(0).origin()); - Assertions.assertEquals("ojpslsvjgpliufi", response.get(0).display().provider()); - Assertions.assertEquals("woyxqvapcohhou", response.get(0).display().resource()); - Assertions.assertEquals("qpqojxcxzrzd", response.get(0).display().operation()); - Assertions.assertEquals("gdzbenr", response.get(0).display().description()); - Assertions.assertEquals(OperationActionType.INTERNAL, response.get(0).actionType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ReRegisterSubscriptionMetadataTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ReRegisterSubscriptionMetadataTests.java deleted file mode 100644 index f53a6f210bd6..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ReRegisterSubscriptionMetadataTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ReRegisterSubscriptionMetadata; -import org.junit.jupiter.api.Assertions; - -public final class ReRegisterSubscriptionMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReRegisterSubscriptionMetadata model - = BinaryData.fromString("{\"enabled\":true,\"concurrencyLimit\":930430831}") - .toObject(ReRegisterSubscriptionMetadata.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(930430831, model.concurrencyLimit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReRegisterSubscriptionMetadata model - = new ReRegisterSubscriptionMetadata().withEnabled(true).withConcurrencyLimit(930430831); - model = BinaryData.fromObject(model).toObject(ReRegisterSubscriptionMetadata.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(930430831, model.concurrencyLimit()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/RequestHeaderOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/RequestHeaderOptionsTests.java deleted file mode 100644 index 4c71ac116b42..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/RequestHeaderOptionsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.OptInHeaderType; -import com.azure.resourcemanager.providerhub.models.RequestHeaderOptions; -import org.junit.jupiter.api.Assertions; - -public final class RequestHeaderOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RequestHeaderOptions model = BinaryData.fromString("{\"optInHeaders\":\"SignedAuxiliaryTokens\"}") - .toObject(RequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.SIGNED_AUXILIARY_TOKENS, model.optInHeaders()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RequestHeaderOptions model - = new RequestHeaderOptions().withOptInHeaders(OptInHeaderType.SIGNED_AUXILIARY_TOKENS); - model = BinaryData.fromObject(model).toObject(RequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.SIGNED_AUXILIARY_TOKENS, model.optInHeaders()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceMovePolicyTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceMovePolicyTests.java deleted file mode 100644 index fb23d28dba29..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceMovePolicyTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceMovePolicy; -import org.junit.jupiter.api.Assertions; - -public final class ResourceMovePolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceMovePolicy model = BinaryData.fromString( - "{\"validationRequired\":false,\"crossResourceGroupMoveEnabled\":true,\"crossSubscriptionMoveEnabled\":false}") - .toObject(ResourceMovePolicy.class); - Assertions.assertEquals(false, model.validationRequired()); - Assertions.assertEquals(true, model.crossResourceGroupMoveEnabled()); - Assertions.assertEquals(false, model.crossSubscriptionMoveEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceMovePolicy model = new ResourceMovePolicy().withValidationRequired(false) - .withCrossResourceGroupMoveEnabled(true) - .withCrossSubscriptionMoveEnabled(false); - model = BinaryData.fromObject(model).toObject(ResourceMovePolicy.class); - Assertions.assertEquals(false, model.validationRequired()); - Assertions.assertEquals(true, model.crossResourceGroupMoveEnabled()); - Assertions.assertEquals(false, model.crossSubscriptionMoveEnabled()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthenticationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthenticationTests.java deleted file mode 100644 index bc8227b6dba4..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthenticationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceProviderAuthentication; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderAuthentication model - = BinaryData.fromString("{\"allowedAudiences\":[\"mrldhu\",\"jzzd\",\"tqxhocdgeab\",\"gphuticndvka\"]}") - .toObject(ResourceProviderAuthentication.class); - Assertions.assertEquals("mrldhu", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderAuthentication model = new ResourceProviderAuthentication() - .withAllowedAudiences(Arrays.asList("mrldhu", "jzzd", "tqxhocdgeab", "gphuticndvka")); - model = BinaryData.fromObject(model).toObject(ResourceProviderAuthentication.class); - Assertions.assertEquals("mrldhu", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthorizationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthorizationTests.java deleted file mode 100644 index d24a9afe6a35..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderAuthorizationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceProviderAuthorization; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderAuthorizationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderAuthorization model = BinaryData.fromString( - "{\"applicationId\":\"qduujitcjczdz\",\"roleDefinitionId\":\"ndhkrw\",\"managedByRoleDefinitionId\":\"appd\"}") - .toObject(ResourceProviderAuthorization.class); - Assertions.assertEquals("qduujitcjczdz", model.applicationId()); - Assertions.assertEquals("ndhkrw", model.roleDefinitionId()); - Assertions.assertEquals("appd", model.managedByRoleDefinitionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderAuthorization model = new ResourceProviderAuthorization().withApplicationId("qduujitcjczdz") - .withRoleDefinitionId("ndhkrw") - .withManagedByRoleDefinitionId("appd"); - model = BinaryData.fromObject(model).toObject(ResourceProviderAuthorization.class); - Assertions.assertEquals("qduujitcjczdz", model.applicationId()); - Assertions.assertEquals("ndhkrw", model.roleDefinitionId()); - Assertions.assertEquals("appd", model.managedByRoleDefinitionId()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCapabilitiesTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCapabilitiesTests.java deleted file mode 100644 index 0760819e5bbc..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderCapabilitiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilities; -import com.azure.resourcemanager.providerhub.models.ResourceProviderCapabilitiesEffect; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderCapabilitiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderCapabilities model = BinaryData.fromString( - "{\"quotaId\":\"dg\",\"effect\":\"NotSpecified\",\"requiredFeatures\":[\"r\",\"vdjwzrlovm\",\"lwhijcoejctbzaq\"]}") - .toObject(ResourceProviderCapabilities.class); - Assertions.assertEquals("dg", model.quotaId()); - Assertions.assertEquals(ResourceProviderCapabilitiesEffect.NOT_SPECIFIED, model.effect()); - Assertions.assertEquals("r", model.requiredFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderCapabilities model = new ResourceProviderCapabilities().withQuotaId("dg") - .withEffect(ResourceProviderCapabilitiesEffect.NOT_SPECIFIED) - .withRequiredFeatures(Arrays.asList("r", "vdjwzrlovm", "lwhijcoejctbzaq")); - model = BinaryData.fromObject(model).toObject(ResourceProviderCapabilities.class); - Assertions.assertEquals("dg", model.quotaId()); - Assertions.assertEquals(ResourceProviderCapabilitiesEffect.NOT_SPECIFIED, model.effect()); - Assertions.assertEquals("r", model.requiredFeatures().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointFeaturesRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointFeaturesRuleTests.java deleted file mode 100644 index 77fa504c9ecc..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointFeaturesRuleTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceProviderEndpointFeaturesRule; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderEndpointFeaturesRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderEndpointFeaturesRule model = BinaryData.fromString("{\"requiredFeaturesPolicy\":\"Any\"}") - .toObject(ResourceProviderEndpointFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderEndpointFeaturesRule model - = new ResourceProviderEndpointFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ANY); - model = BinaryData.fromObject(model).toObject(ResourceProviderEndpointFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointTests.java deleted file mode 100644 index 4906b2e26219..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderEndpointTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceProviderEndpoint; -import com.azure.resourcemanager.providerhub.models.ResourceProviderEndpointFeaturesRule; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderEndpoint model = BinaryData.fromString( - "{\"enabled\":false,\"apiVersions\":[\"irryuzhlh\",\"joqrvqqaatj\",\"nrvgoupmfiibfgg\"],\"endpointUri\":\"ool\",\"locations\":[\"x\",\"v\",\"kkgll\"],\"requiredFeatures\":[\"ygvjayvblmh\",\"k\",\"uhbxvvy\"],\"featuresRule\":{\"requiredFeaturesPolicy\":\"Any\"},\"timeout\":\"PT216H15M8S\"}") - .toObject(ResourceProviderEndpoint.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("irryuzhlh", model.apiVersions().get(0)); - Assertions.assertEquals("ool", model.endpointUri()); - Assertions.assertEquals("x", model.locations().get(0)); - Assertions.assertEquals("ygvjayvblmh", model.requiredFeatures().get(0)); - Assertions.assertEquals(FeaturesPolicy.ANY, model.featuresRule().requiredFeaturesPolicy()); - Assertions.assertEquals(Duration.parse("PT216H15M8S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderEndpoint model = new ResourceProviderEndpoint().withEnabled(false) - .withApiVersions(Arrays.asList("irryuzhlh", "joqrvqqaatj", "nrvgoupmfiibfgg")) - .withEndpointUri("ool") - .withLocations(Arrays.asList("x", "v", "kkgll")) - .withRequiredFeatures(Arrays.asList("ygvjayvblmh", "k", "uhbxvvy")) - .withFeaturesRule(new ResourceProviderEndpointFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ANY)) - .withTimeout(Duration.parse("PT216H15M8S")); - model = BinaryData.fromObject(model).toObject(ResourceProviderEndpoint.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("irryuzhlh", model.apiVersions().get(0)); - Assertions.assertEquals("ool", model.endpointUri()); - Assertions.assertEquals("x", model.locations().get(0)); - Assertions.assertEquals("ygvjayvblmh", model.requiredFeatures().get(0)); - Assertions.assertEquals(FeaturesPolicy.ANY, model.featuresRule().requiredFeaturesPolicy()); - Assertions.assertEquals(Duration.parse("PT216H15M8S"), model.timeout()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManagementTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManagementTests.java deleted file mode 100644 index 6e7c0042869f..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManagementTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceAccessPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManagement; -import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManagementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManagement model = BinaryData.fromString( - "{\"schemaOwners\":[\"ifiyipjxsqwpgrj\",\"znorcj\",\"vsnb\",\"xqabnmocpcysh\"],\"manifestOwners\":[\"afbljjgpbtoqcjmk\"],\"incidentRoutingService\":\"a\",\"incidentRoutingTeam\":\"qidtqajzyu\",\"incidentContactEmail\":\"kudjkrlkhb\",\"serviceTreeInfos\":[{\"serviceId\":\"pgzgq\",\"componentId\":\"zloc\"},{\"serviceId\":\"c\",\"componentId\":\"ierhhbcsglummaj\"}],\"resourceAccessPolicy\":\"AcisReadAllowed\",\"resourceAccessRoles\":[\"dataxobnbdxkqpxok\"]}") - .toObject(ResourceProviderManagement.class); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.schemaOwners().get(0)); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.manifestOwners().get(0)); - Assertions.assertEquals("a", model.incidentRoutingService()); - Assertions.assertEquals("qidtqajzyu", model.incidentRoutingTeam()); - Assertions.assertEquals("kudjkrlkhb", model.incidentContactEmail()); - Assertions.assertEquals("pgzgq", model.serviceTreeInfos().get(0).serviceId()); - Assertions.assertEquals("zloc", model.serviceTreeInfos().get(0).componentId()); - Assertions.assertEquals(ResourceAccessPolicy.ACIS_READ_ALLOWED, model.resourceAccessPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManagement model = new ResourceProviderManagement() - .withSchemaOwners(Arrays.asList("ifiyipjxsqwpgrj", "znorcj", "vsnb", "xqabnmocpcysh")) - .withManifestOwners(Arrays.asList("afbljjgpbtoqcjmk")) - .withIncidentRoutingService("a") - .withIncidentRoutingTeam("qidtqajzyu") - .withIncidentContactEmail("kudjkrlkhb") - .withServiceTreeInfos(Arrays.asList(new ServiceTreeInfo().withServiceId("pgzgq").withComponentId("zloc"), - new ServiceTreeInfo().withServiceId("c").withComponentId("ierhhbcsglummaj"))) - .withResourceAccessPolicy(ResourceAccessPolicy.ACIS_READ_ALLOWED) - .withResourceAccessRoles(Arrays.asList("dataxobnbdxkqpxok")); - model = BinaryData.fromObject(model).toObject(ResourceProviderManagement.class); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.schemaOwners().get(0)); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.manifestOwners().get(0)); - Assertions.assertEquals("a", model.incidentRoutingService()); - Assertions.assertEquals("qidtqajzyu", model.incidentRoutingTeam()); - Assertions.assertEquals("kudjkrlkhb", model.incidentContactEmail()); - Assertions.assertEquals("pgzgq", model.serviceTreeInfos().get(0).serviceId()); - Assertions.assertEquals("zloc", model.serviceTreeInfos().get(0).componentId()); - Assertions.assertEquals(ResourceAccessPolicy.ACIS_READ_ALLOWED, model.resourceAccessPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestFeaturesRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestFeaturesRuleTests.java deleted file mode 100644 index a6e592aa389e..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestFeaturesRuleTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestFeaturesRule; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestFeaturesRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestFeaturesRule model = BinaryData.fromString("{\"requiredFeaturesPolicy\":\"All\"}") - .toObject(ResourceProviderManifestFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ALL, model.requiredFeaturesPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestFeaturesRule model - = new ResourceProviderManifestFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ALL); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ALL, model.requiredFeaturesPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestManagementTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestManagementTests.java deleted file mode 100644 index 989bdec1c1a5..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestManagementTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceAccessPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestManagement; -import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestManagementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestManagement model = BinaryData.fromString( - "{\"schemaOwners\":[\"hlmctlpdngitvgb\",\"hrixkwmy\",\"jejveg\"],\"manifestOwners\":[\"pna\",\"xexccbdreaxhcexd\",\"rvqahqkghtpwi\",\"nhyjsv\"],\"incidentRoutingService\":\"cxzbfvoowvr\",\"incidentRoutingTeam\":\"t\",\"incidentContactEmail\":\"qp\",\"serviceTreeInfos\":[{\"serviceId\":\"tronzmyhgfi\",\"componentId\":\"sxkm\"},{\"serviceId\":\"a\",\"componentId\":\"rrjreafxtsgu\"}],\"resourceAccessPolicy\":\"AcisActionAllowed\",\"resourceAccessRoles\":[\"dataikkx\"]}") - .toObject(ResourceProviderManifestManagement.class); - Assertions.assertEquals("hlmctlpdngitvgb", model.schemaOwners().get(0)); - Assertions.assertEquals("pna", model.manifestOwners().get(0)); - Assertions.assertEquals("cxzbfvoowvr", model.incidentRoutingService()); - Assertions.assertEquals("t", model.incidentRoutingTeam()); - Assertions.assertEquals("qp", model.incidentContactEmail()); - Assertions.assertEquals("tronzmyhgfi", model.serviceTreeInfos().get(0).serviceId()); - Assertions.assertEquals("sxkm", model.serviceTreeInfos().get(0).componentId()); - Assertions.assertEquals(ResourceAccessPolicy.ACIS_ACTION_ALLOWED, model.resourceAccessPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestManagement model = new ResourceProviderManifestManagement() - .withSchemaOwners(Arrays.asList("hlmctlpdngitvgb", "hrixkwmy", "jejveg")) - .withManifestOwners(Arrays.asList("pna", "xexccbdreaxhcexd", "rvqahqkghtpwi", "nhyjsv")) - .withIncidentRoutingService("cxzbfvoowvr") - .withIncidentRoutingTeam("t") - .withIncidentContactEmail("qp") - .withServiceTreeInfos( - Arrays.asList(new ServiceTreeInfo().withServiceId("tronzmyhgfi").withComponentId("sxkm"), - new ServiceTreeInfo().withServiceId("a").withComponentId("rrjreafxtsgu"))) - .withResourceAccessPolicy(ResourceAccessPolicy.ACIS_ACTION_ALLOWED) - .withResourceAccessRoles(Arrays.asList("dataikkx")); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestManagement.class); - Assertions.assertEquals("hlmctlpdngitvgb", model.schemaOwners().get(0)); - Assertions.assertEquals("pna", model.manifestOwners().get(0)); - Assertions.assertEquals("cxzbfvoowvr", model.incidentRoutingService()); - Assertions.assertEquals("t", model.incidentRoutingTeam()); - Assertions.assertEquals("qp", model.incidentContactEmail()); - Assertions.assertEquals("tronzmyhgfi", model.serviceTreeInfos().get(0).serviceId()); - Assertions.assertEquals("sxkm", model.serviceTreeInfos().get(0).componentId()); - Assertions.assertEquals(ResourceAccessPolicy.ACIS_ACTION_ALLOWED, model.resourceAccessPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesFeaturesRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesFeaturesRuleTests.java deleted file mode 100644 index 597ad626859e..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesFeaturesRuleTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesFeaturesRule; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestPropertiesFeaturesRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestPropertiesFeaturesRule model - = BinaryData.fromString("{\"requiredFeaturesPolicy\":\"Any\"}") - .toObject(ResourceProviderManifestPropertiesFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestPropertiesFeaturesRule model - = new ResourceProviderManifestPropertiesFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ANY); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestPropertiesFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesManagementTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesManagementTests.java deleted file mode 100644 index 9f7bc8dcd4fb..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesManagementTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceAccessPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesManagement; -import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestPropertiesManagementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestPropertiesManagement model = BinaryData.fromString( - "{\"schemaOwners\":[\"ckyfih\",\"fidfvzw\"],\"manifestOwners\":[\"htymw\"],\"incidentRoutingService\":\"dkfthwxmnt\",\"incidentRoutingTeam\":\"waopvkmijcmmxd\",\"incidentContactEmail\":\"fufsrpymzi\",\"serviceTreeInfos\":[{\"serviceId\":\"zcxtbzsgfyccsn\",\"componentId\":\"mdwzjeiachboo\"},{\"serviceId\":\"lnrosfqp\",\"componentId\":\"ehzzvypyqrim\"}],\"resourceAccessPolicy\":\"NotSpecified\",\"resourceAccessRoles\":[\"dataswjdkirso\",\"datadqxhcrmnohjtckwh\"]}") - .toObject(ResourceProviderManifestPropertiesManagement.class); - Assertions.assertEquals("ckyfih", model.schemaOwners().get(0)); - Assertions.assertEquals("htymw", model.manifestOwners().get(0)); - Assertions.assertEquals("dkfthwxmnt", model.incidentRoutingService()); - Assertions.assertEquals("waopvkmijcmmxd", model.incidentRoutingTeam()); - Assertions.assertEquals("fufsrpymzi", model.incidentContactEmail()); - Assertions.assertEquals("zcxtbzsgfyccsn", model.serviceTreeInfos().get(0).serviceId()); - Assertions.assertEquals("mdwzjeiachboo", model.serviceTreeInfos().get(0).componentId()); - Assertions.assertEquals(ResourceAccessPolicy.NOT_SPECIFIED, model.resourceAccessPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestPropertiesManagement model - = new ResourceProviderManifestPropertiesManagement().withSchemaOwners(Arrays.asList("ckyfih", "fidfvzw")) - .withManifestOwners(Arrays.asList("htymw")) - .withIncidentRoutingService("dkfthwxmnt") - .withIncidentRoutingTeam("waopvkmijcmmxd") - .withIncidentContactEmail("fufsrpymzi") - .withServiceTreeInfos(Arrays.asList( - new ServiceTreeInfo().withServiceId("zcxtbzsgfyccsn").withComponentId("mdwzjeiachboo"), - new ServiceTreeInfo().withServiceId("lnrosfqp").withComponentId("ehzzvypyqrim"))) - .withResourceAccessPolicy(ResourceAccessPolicy.NOT_SPECIFIED) - .withResourceAccessRoles(Arrays.asList("dataswjdkirso", "datadqxhcrmnohjtckwh")); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestPropertiesManagement.class); - Assertions.assertEquals("ckyfih", model.schemaOwners().get(0)); - Assertions.assertEquals("htymw", model.manifestOwners().get(0)); - Assertions.assertEquals("dkfthwxmnt", model.incidentRoutingService()); - Assertions.assertEquals("waopvkmijcmmxd", model.incidentRoutingTeam()); - Assertions.assertEquals("fufsrpymzi", model.incidentContactEmail()); - Assertions.assertEquals("zcxtbzsgfyccsn", model.serviceTreeInfos().get(0).serviceId()); - Assertions.assertEquals("mdwzjeiachboo", model.serviceTreeInfos().get(0).componentId()); - Assertions.assertEquals(ResourceAccessPolicy.NOT_SPECIFIED, model.resourceAccessPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesProviderAuthenticationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesProviderAuthenticationTests.java deleted file mode 100644 index aaccd6d5124f..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesProviderAuthenticationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesProviderAuthentication; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestPropertiesProviderAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestPropertiesProviderAuthentication model - = BinaryData.fromString("{\"allowedAudiences\":[\"sszdnru\",\"qguhmuo\",\"qfprwzwbn\",\"uitnwuiz\"]}") - .toObject(ResourceProviderManifestPropertiesProviderAuthentication.class); - Assertions.assertEquals("sszdnru", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestPropertiesProviderAuthentication model - = new ResourceProviderManifestPropertiesProviderAuthentication() - .withAllowedAudiences(Arrays.asList("sszdnru", "qguhmuo", "qfprwzwbn", "uitnwuiz")); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestPropertiesProviderAuthentication.class); - Assertions.assertEquals("sszdnru", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesRequestHeaderOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesRequestHeaderOptionsTests.java deleted file mode 100644 index 8c94d9550e4c..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesRequestHeaderOptionsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.OptInHeaderType; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesRequestHeaderOptions; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestPropertiesRequestHeaderOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestPropertiesRequestHeaderOptions model - = BinaryData.fromString("{\"optInHeaders\":\"NotSpecified\"}") - .toObject(ResourceProviderManifestPropertiesRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.NOT_SPECIFIED, model.optInHeaders()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestPropertiesRequestHeaderOptions model - = new ResourceProviderManifestPropertiesRequestHeaderOptions() - .withOptInHeaders(OptInHeaderType.NOT_SPECIFIED); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestPropertiesRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.NOT_SPECIFIED, model.optInHeaders()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesTemplateDeploymentOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesTemplateDeploymentOptionsTests.java deleted file mode 100644 index d5d1ed6a476d..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestPropertiesTemplateDeploymentOptionsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.PreflightOption; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestPropertiesTemplateDeploymentOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestPropertiesTemplateDeploymentOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestPropertiesTemplateDeploymentOptions model = BinaryData.fromString( - "{\"preflightSupported\":false,\"preflightOptions\":[\"ContinueDeploymentOnFailure\",\"ContinueDeploymentOnFailure\"]}") - .toObject(ResourceProviderManifestPropertiesTemplateDeploymentOptions.class); - Assertions.assertEquals(false, model.preflightSupported()); - Assertions.assertEquals(PreflightOption.CONTINUE_DEPLOYMENT_ON_FAILURE, model.preflightOptions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestPropertiesTemplateDeploymentOptions model - = new ResourceProviderManifestPropertiesTemplateDeploymentOptions().withPreflightSupported(false) - .withPreflightOptions(Arrays.asList(PreflightOption.CONTINUE_DEPLOYMENT_ON_FAILURE, - PreflightOption.CONTINUE_DEPLOYMENT_ON_FAILURE)); - model - = BinaryData.fromObject(model).toObject(ResourceProviderManifestPropertiesTemplateDeploymentOptions.class); - Assertions.assertEquals(false, model.preflightSupported()); - Assertions.assertEquals(PreflightOption.CONTINUE_DEPLOYMENT_ON_FAILURE, model.preflightOptions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestProviderAuthenticationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestProviderAuthenticationTests.java deleted file mode 100644 index 5fd0dbb0bb87..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestProviderAuthenticationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestProviderAuthentication; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestProviderAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestProviderAuthentication model - = BinaryData.fromString("{\"allowedAudiences\":[\"ob\",\"pg\",\"edkowepbqpcrfk\"]}") - .toObject(ResourceProviderManifestProviderAuthentication.class); - Assertions.assertEquals("ob", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestProviderAuthentication model = new ResourceProviderManifestProviderAuthentication() - .withAllowedAudiences(Arrays.asList("ob", "pg", "edkowepbqpcrfk")); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestProviderAuthentication.class); - Assertions.assertEquals("ob", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestReRegisterSubscriptionMetadataTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestReRegisterSubscriptionMetadataTests.java deleted file mode 100644 index 5846e886f779..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestReRegisterSubscriptionMetadataTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestReRegisterSubscriptionMetadata; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestReRegisterSubscriptionMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestReRegisterSubscriptionMetadata model - = BinaryData.fromString("{\"enabled\":false,\"concurrencyLimit\":1050181050}") - .toObject(ResourceProviderManifestReRegisterSubscriptionMetadata.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(1050181050, model.concurrencyLimit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestReRegisterSubscriptionMetadata model - = new ResourceProviderManifestReRegisterSubscriptionMetadata().withEnabled(false) - .withConcurrencyLimit(1050181050); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestReRegisterSubscriptionMetadata.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(1050181050, model.concurrencyLimit()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestRequestHeaderOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestRequestHeaderOptionsTests.java deleted file mode 100644 index d802949eab2d..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProviderManifestRequestHeaderOptionsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.OptInHeaderType; -import com.azure.resourcemanager.providerhub.models.ResourceProviderManifestRequestHeaderOptions; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderManifestRequestHeaderOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderManifestRequestHeaderOptions model - = BinaryData.fromString("{\"optInHeaders\":\"NotSpecified\"}") - .toObject(ResourceProviderManifestRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.NOT_SPECIFIED, model.optInHeaders()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderManifestRequestHeaderOptions model - = new ResourceProviderManifestRequestHeaderOptions().withOptInHeaders(OptInHeaderType.NOT_SPECIFIED); - model = BinaryData.fromObject(model).toObject(ResourceProviderManifestRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.NOT_SPECIFIED, model.optInHeaders()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProvidersCheckinManifestWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProvidersCheckinManifestWithResponseMockTests.java deleted file mode 100644 index 6e8fd76f822d..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceProvidersCheckinManifestWithResponseMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.CheckinManifestInfo; -import com.azure.resourcemanager.providerhub.models.CheckinManifestParams; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersCheckinManifestWithResponseMockTests { - @Test - public void testCheckinManifestWithResponse() throws Exception { - String responseStr - = "{\"isCheckedIn\":true,\"statusMessage\":\"bwidql\",\"pullRequest\":\"ukoveofi\",\"commitId\":\"vjfn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckinManifestInfo response = manager.resourceProviders() - .checkinManifestWithResponse("mjvlgfgg", - new CheckinManifestParams().withEnvironment("vkyylizrzbjpsf") - .withBaselineArmManifestLocation("sfuztlvtmv"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.isCheckedIn()); - Assertions.assertEquals("bwidql", response.statusMessage()); - Assertions.assertEquals("ukoveofi", response.pullRequest()); - Assertions.assertEquals("vjfn", response.commitId()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointFeaturesRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointFeaturesRuleTests.java deleted file mode 100644 index f811b66a0ec5..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointFeaturesRuleTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointFeaturesRule; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeEndpointFeaturesRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeEndpointFeaturesRule model = BinaryData.fromString("{\"requiredFeaturesPolicy\":\"All\"}") - .toObject(ResourceTypeEndpointFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ALL, model.requiredFeaturesPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeEndpointFeaturesRule model - = new ResourceTypeEndpointFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ALL); - model = BinaryData.fromObject(model).toObject(ResourceTypeEndpointFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ALL, model.requiredFeaturesPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointTests.java deleted file mode 100644 index d7ff2e6bd3fa..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeEndpointTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtensionCategory; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpoint; -import com.azure.resourcemanager.providerhub.models.ResourceTypeEndpointFeaturesRule; -import com.azure.resourcemanager.providerhub.models.ResourceTypeExtension; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeEndpoint model = BinaryData.fromString( - "{\"enabled\":true,\"apiVersions\":[\"tkcxywnytnrsy\",\"lqidyby\",\"czfc\",\"haaxdbabphl\"],\"locations\":[\"lfktsths\",\"cocmnyyaztt\",\"twwrqp\"],\"requiredFeatures\":[\"ckzywbiexzfeyue\",\"xibxujwbhqwalm\",\"zyoxaepdkzjan\"],\"featuresRule\":{\"requiredFeaturesPolicy\":\"All\"},\"extensions\":[{\"endpointUri\":\"wbavxbniwdj\",\"extensionCategories\":[\"ResourcePatchValidate\"],\"timeout\":\"PT205H18M18S\"},{\"endpointUri\":\"pgn\",\"extensionCategories\":[\"NotSpecified\"],\"timeout\":\"PT9H59M7S\"},{\"endpointUri\":\"xbzpfzab\",\"extensionCategories\":[\"ResourceMoveCompleted\"],\"timeout\":\"PT199H50M23S\"},{\"endpointUri\":\"tcty\",\"extensionCategories\":[\"ResourcePatchCompleted\"],\"timeout\":\"PT117H14M9S\"}],\"timeout\":\"PT81H33M36S\"}") - .toObject(ResourceTypeEndpoint.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("tkcxywnytnrsy", model.apiVersions().get(0)); - Assertions.assertEquals("lfktsths", model.locations().get(0)); - Assertions.assertEquals("ckzywbiexzfeyue", model.requiredFeatures().get(0)); - Assertions.assertEquals(FeaturesPolicy.ALL, model.featuresRule().requiredFeaturesPolicy()); - Assertions.assertEquals("wbavxbniwdj", model.extensions().get(0).endpointUri()); - Assertions.assertEquals(ExtensionCategory.RESOURCE_PATCH_VALIDATE, - model.extensions().get(0).extensionCategories().get(0)); - Assertions.assertEquals(Duration.parse("PT205H18M18S"), model.extensions().get(0).timeout()); - Assertions.assertEquals(Duration.parse("PT81H33M36S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeEndpoint model = new ResourceTypeEndpoint().withEnabled(true) - .withApiVersions(Arrays.asList("tkcxywnytnrsy", "lqidyby", "czfc", "haaxdbabphl")) - .withLocations(Arrays.asList("lfktsths", "cocmnyyaztt", "twwrqp")) - .withRequiredFeatures(Arrays.asList("ckzywbiexzfeyue", "xibxujwbhqwalm", "zyoxaepdkzjan")) - .withFeaturesRule(new ResourceTypeEndpointFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ALL)) - .withExtensions(Arrays.asList( - new ResourceTypeExtension().withEndpointUri("wbavxbniwdj") - .withExtensionCategories(Arrays.asList(ExtensionCategory.RESOURCE_PATCH_VALIDATE)) - .withTimeout(Duration.parse("PT205H18M18S")), - new ResourceTypeExtension().withEndpointUri("pgn") - .withExtensionCategories(Arrays.asList(ExtensionCategory.NOT_SPECIFIED)) - .withTimeout(Duration.parse("PT9H59M7S")), - new ResourceTypeExtension().withEndpointUri("xbzpfzab") - .withExtensionCategories(Arrays.asList(ExtensionCategory.RESOURCE_MOVE_COMPLETED)) - .withTimeout(Duration.parse("PT199H50M23S")), - new ResourceTypeExtension().withEndpointUri("tcty") - .withExtensionCategories(Arrays.asList(ExtensionCategory.RESOURCE_PATCH_COMPLETED)) - .withTimeout(Duration.parse("PT117H14M9S")))) - .withTimeout(Duration.parse("PT81H33M36S")); - model = BinaryData.fromObject(model).toObject(ResourceTypeEndpoint.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("tkcxywnytnrsy", model.apiVersions().get(0)); - Assertions.assertEquals("lfktsths", model.locations().get(0)); - Assertions.assertEquals("ckzywbiexzfeyue", model.requiredFeatures().get(0)); - Assertions.assertEquals(FeaturesPolicy.ALL, model.featuresRule().requiredFeaturesPolicy()); - Assertions.assertEquals("wbavxbniwdj", model.extensions().get(0).endpointUri()); - Assertions.assertEquals(ExtensionCategory.RESOURCE_PATCH_VALIDATE, - model.extensions().get(0).extensionCategories().get(0)); - Assertions.assertEquals(Duration.parse("PT205H18M18S"), model.extensions().get(0).timeout()); - Assertions.assertEquals(Duration.parse("PT81H33M36S"), model.timeout()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsResourceCreationBeginTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsResourceCreationBeginTests.java deleted file mode 100644 index 1ab9d4099d29..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsResourceCreationBeginTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtensionOptionType; -import com.azure.resourcemanager.providerhub.models.ResourceTypeExtensionOptionsResourceCreationBegin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeExtensionOptionsResourceCreationBeginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeExtensionOptionsResourceCreationBegin model = BinaryData.fromString( - "{\"request\":[\"IncludeInternalMetadata\",\"DoNotMergeExistingReadOnlyAndSecretProperties\"],\"response\":[\"NotSpecified\",\"IncludeInternalMetadata\"]}") - .toObject(ResourceTypeExtensionOptionsResourceCreationBegin.class); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, model.request().get(0)); - Assertions.assertEquals(ExtensionOptionType.NOT_SPECIFIED, model.response().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeExtensionOptionsResourceCreationBegin model - = new ResourceTypeExtensionOptionsResourceCreationBegin() - .withRequest(Arrays.asList(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, - ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES)) - .withResponse( - Arrays.asList(ExtensionOptionType.NOT_SPECIFIED, ExtensionOptionType.INCLUDE_INTERNAL_METADATA)); - model = BinaryData.fromObject(model).toObject(ResourceTypeExtensionOptionsResourceCreationBegin.class); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, model.request().get(0)); - Assertions.assertEquals(ExtensionOptionType.NOT_SPECIFIED, model.response().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsTests.java deleted file mode 100644 index 68c0ad827ad7..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionOptionsTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtensionOptionType; -import com.azure.resourcemanager.providerhub.models.ResourceTypeExtensionOptions; -import com.azure.resourcemanager.providerhub.models.ResourceTypeExtensionOptionsResourceCreationBegin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeExtensionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeExtensionOptions model = BinaryData.fromString( - "{\"resourceCreationBegin\":{\"request\":[\"DoNotMergeExistingReadOnlyAndSecretProperties\",\"DoNotMergeExistingReadOnlyAndSecretProperties\",\"NotSpecified\",\"IncludeInternalMetadata\"],\"response\":[\"IncludeInternalMetadata\"]}}") - .toObject(ResourceTypeExtensionOptions.class); - Assertions.assertEquals(ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES, - model.resourceCreationBegin().request().get(0)); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, - model.resourceCreationBegin().response().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeExtensionOptions model = new ResourceTypeExtensionOptions() - .withResourceCreationBegin(new ResourceTypeExtensionOptionsResourceCreationBegin() - .withRequest(Arrays.asList(ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES, - ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES, - ExtensionOptionType.NOT_SPECIFIED, ExtensionOptionType.INCLUDE_INTERNAL_METADATA)) - .withResponse(Arrays.asList(ExtensionOptionType.INCLUDE_INTERNAL_METADATA))); - model = BinaryData.fromObject(model).toObject(ResourceTypeExtensionOptions.class); - Assertions.assertEquals(ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES, - model.resourceCreationBegin().request().get(0)); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, - model.resourceCreationBegin().response().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionTests.java deleted file mode 100644 index 7a4ea42508fe..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeExtensionTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtensionCategory; -import com.azure.resourcemanager.providerhub.models.ResourceTypeExtension; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeExtensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeExtension model = BinaryData.fromString( - "{\"endpointUri\":\"wzbhvgyugu\",\"extensionCategories\":[\"ResourceMoveBegin\",\"ResourceDeletionBegin\",\"ResourcePostAction\"],\"timeout\":\"PT7H8S\"}") - .toObject(ResourceTypeExtension.class); - Assertions.assertEquals("wzbhvgyugu", model.endpointUri()); - Assertions.assertEquals(ExtensionCategory.RESOURCE_MOVE_BEGIN, model.extensionCategories().get(0)); - Assertions.assertEquals(Duration.parse("PT7H8S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeExtension model = new ResourceTypeExtension().withEndpointUri("wzbhvgyugu") - .withExtensionCategories(Arrays.asList(ExtensionCategory.RESOURCE_MOVE_BEGIN, - ExtensionCategory.RESOURCE_DELETION_BEGIN, ExtensionCategory.RESOURCE_POST_ACTION)) - .withTimeout(Duration.parse("PT7H8S")); - model = BinaryData.fromObject(model).toObject(ResourceTypeExtension.class); - Assertions.assertEquals("wzbhvgyugu", model.endpointUri()); - Assertions.assertEquals(ExtensionCategory.RESOURCE_MOVE_BEGIN, model.extensionCategories().get(0)); - Assertions.assertEquals(Duration.parse("PT7H8S"), model.timeout()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeFeaturesRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeFeaturesRuleTests.java deleted file mode 100644 index 30f964d98e79..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeFeaturesRuleTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceTypeFeaturesRule; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeFeaturesRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeFeaturesRule model - = BinaryData.fromString("{\"requiredFeaturesPolicy\":\"All\"}").toObject(ResourceTypeFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ALL, model.requiredFeaturesPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeFeaturesRule model = new ResourceTypeFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ALL); - model = BinaryData.fromObject(model).toObject(ResourceTypeFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ALL, model.requiredFeaturesPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeIdentityManagementTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeIdentityManagementTests.java deleted file mode 100644 index 4a5372fc579c..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeIdentityManagementTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.IdentityManagementTypes; -import com.azure.resourcemanager.providerhub.models.ResourceTypeIdentityManagement; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeIdentityManagementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeIdentityManagement model - = BinaryData.fromString("{\"type\":\"Actor\"}").toObject(ResourceTypeIdentityManagement.class); - Assertions.assertEquals(IdentityManagementTypes.ACTOR, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeIdentityManagement model - = new ResourceTypeIdentityManagement().withType(IdentityManagementTypes.ACTOR); - model = BinaryData.fromObject(model).toObject(ResourceTypeIdentityManagement.class); - Assertions.assertEquals(IdentityManagementTypes.ACTOR, model.type()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecificationsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecificationsTests.java deleted file mode 100644 index 509894291506..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecificationsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecificationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications model = BinaryData.fromString( - "{\"enableDefaultValidation\":true,\"resourceTypesWithCustomValidation\":[\"shsfwxosowzxcu\",\"i\",\"jooxdjebw\"]}") - .toObject(ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.class); - Assertions.assertEquals(true, model.enableDefaultValidation()); - Assertions.assertEquals("shsfwxosowzxcu", model.resourceTypesWithCustomValidation().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications model - = new ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications() - .withEnableDefaultValidation(true) - .withResourceTypesWithCustomValidation(Arrays.asList("shsfwxosowzxcu", "i", "jooxdjebw")); - model = BinaryData.fromObject(model) - .toObject(ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications.class); - Assertions.assertEquals(true, model.enableDefaultValidation()); - Assertions.assertEquals("shsfwxosowzxcu", model.resourceTypesWithCustomValidation().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesExtensionOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesExtensionOptionsTests.java deleted file mode 100644 index bd5c765fcdf3..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesExtensionOptionsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtensionOptionType; -import com.azure.resourcemanager.providerhub.models.ResourceTypeExtensionOptionsResourceCreationBegin; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesExtensionOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesExtensionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesExtensionOptions model = BinaryData.fromString( - "{\"resourceCreationBegin\":{\"request\":[\"IncludeInternalMetadata\",\"DoNotMergeExistingReadOnlyAndSecretProperties\",\"DoNotMergeExistingReadOnlyAndSecretProperties\"],\"response\":[\"DoNotMergeExistingReadOnlyAndSecretProperties\"]}}") - .toObject(ResourceTypeRegistrationPropertiesExtensionOptions.class); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, - model.resourceCreationBegin().request().get(0)); - Assertions.assertEquals(ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES, - model.resourceCreationBegin().response().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesExtensionOptions model - = new ResourceTypeRegistrationPropertiesExtensionOptions() - .withResourceCreationBegin(new ResourceTypeExtensionOptionsResourceCreationBegin() - .withRequest(Arrays.asList(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, - ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES, - ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES)) - .withResponse( - Arrays.asList(ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES))); - model = BinaryData.fromObject(model).toObject(ResourceTypeRegistrationPropertiesExtensionOptions.class); - Assertions.assertEquals(ExtensionOptionType.INCLUDE_INTERNAL_METADATA, - model.resourceCreationBegin().request().get(0)); - Assertions.assertEquals(ExtensionOptionType.DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES, - model.resourceCreationBegin().response().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesFeaturesRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesFeaturesRuleTests.java deleted file mode 100644 index 446aa41931cb..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesFeaturesRuleTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.FeaturesPolicy; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesFeaturesRule; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesFeaturesRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesFeaturesRule model - = BinaryData.fromString("{\"requiredFeaturesPolicy\":\"Any\"}") - .toObject(ResourceTypeRegistrationPropertiesFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesFeaturesRule model - = new ResourceTypeRegistrationPropertiesFeaturesRule().withRequiredFeaturesPolicy(FeaturesPolicy.ANY); - model = BinaryData.fromObject(model).toObject(ResourceTypeRegistrationPropertiesFeaturesRule.class); - Assertions.assertEquals(FeaturesPolicy.ANY, model.requiredFeaturesPolicy()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesIdentityManagementTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesIdentityManagementTests.java deleted file mode 100644 index 6d9768167fdc..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesIdentityManagementTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.IdentityManagementTypes; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesIdentityManagement; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesIdentityManagementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesIdentityManagement model - = BinaryData.fromString("{\"type\":\"NotSpecified\",\"applicationId\":\"mzlfmisgwb\"}") - .toObject(ResourceTypeRegistrationPropertiesIdentityManagement.class); - Assertions.assertEquals(IdentityManagementTypes.NOT_SPECIFIED, model.type()); - Assertions.assertEquals("mzlfmisgwb", model.applicationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesIdentityManagement model - = new ResourceTypeRegistrationPropertiesIdentityManagement().withType(IdentityManagementTypes.NOT_SPECIFIED) - .withApplicationId("mzlfmisgwb"); - model = BinaryData.fromObject(model).toObject(ResourceTypeRegistrationPropertiesIdentityManagement.class); - Assertions.assertEquals(IdentityManagementTypes.NOT_SPECIFIED, model.type()); - Assertions.assertEquals("mzlfmisgwb", model.applicationId()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesRequestHeaderOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesRequestHeaderOptionsTests.java deleted file mode 100644 index b128e377e8a4..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesRequestHeaderOptionsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.OptInHeaderType; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesRequestHeaderOptions; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesRequestHeaderOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesRequestHeaderOptions model - = BinaryData.fromString("{\"optInHeaders\":\"NotSpecified\"}") - .toObject(ResourceTypeRegistrationPropertiesRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.NOT_SPECIFIED, model.optInHeaders()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesRequestHeaderOptions model - = new ResourceTypeRegistrationPropertiesRequestHeaderOptions() - .withOptInHeaders(OptInHeaderType.NOT_SPECIFIED); - model = BinaryData.fromObject(model).toObject(ResourceTypeRegistrationPropertiesRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.NOT_SPECIFIED, model.optInHeaders()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesResourceMovePolicyTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesResourceMovePolicyTests.java deleted file mode 100644 index 2e649caaae6e..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesResourceMovePolicyTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesResourceMovePolicy; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesResourceMovePolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesResourceMovePolicy model = BinaryData.fromString( - "{\"validationRequired\":false,\"crossResourceGroupMoveEnabled\":false,\"crossSubscriptionMoveEnabled\":true}") - .toObject(ResourceTypeRegistrationPropertiesResourceMovePolicy.class); - Assertions.assertEquals(false, model.validationRequired()); - Assertions.assertEquals(false, model.crossResourceGroupMoveEnabled()); - Assertions.assertEquals(true, model.crossSubscriptionMoveEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesResourceMovePolicy model - = new ResourceTypeRegistrationPropertiesResourceMovePolicy().withValidationRequired(false) - .withCrossResourceGroupMoveEnabled(false) - .withCrossSubscriptionMoveEnabled(true); - model = BinaryData.fromObject(model).toObject(ResourceTypeRegistrationPropertiesResourceMovePolicy.class); - Assertions.assertEquals(false, model.validationRequired()); - Assertions.assertEquals(false, model.crossResourceGroupMoveEnabled()); - Assertions.assertEquals(true, model.crossSubscriptionMoveEnabled()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java deleted file mode 100644 index c79ed20275ab..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications; -import com.azure.resourcemanager.providerhub.models.SubscriptionNotificationOperation; -import com.azure.resourcemanager.providerhub.models.SubscriptionStateOverrideAction; -import com.azure.resourcemanager.providerhub.models.SubscriptionTransitioningState; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecificationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications model = BinaryData.fromString( - "{\"subscriptionStateOverrideActions\":[{\"state\":\"Deleted\",\"action\":\"BillingCancellation\"},{\"state\":\"Deleted\",\"action\":\"NotDefined\"}],\"softDeleteTTL\":\"PT151H58M7S\"}") - .toObject(ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.class); - Assertions.assertEquals(SubscriptionTransitioningState.DELETED, - model.subscriptionStateOverrideActions().get(0).state()); - Assertions.assertEquals(SubscriptionNotificationOperation.BILLING_CANCELLATION, - model.subscriptionStateOverrideActions().get(0).action()); - Assertions.assertEquals(Duration.parse("PT151H58M7S"), model.softDeleteTtl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications model - = new ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications() - .withSubscriptionStateOverrideActions(Arrays.asList( - new SubscriptionStateOverrideAction().withState(SubscriptionTransitioningState.DELETED) - .withAction(SubscriptionNotificationOperation.BILLING_CANCELLATION), - new SubscriptionStateOverrideAction().withState(SubscriptionTransitioningState.DELETED) - .withAction(SubscriptionNotificationOperation.NOT_DEFINED))) - .withSoftDeleteTtl(Duration.parse("PT151H58M7S")); - model = BinaryData.fromObject(model) - .toObject(ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications.class); - Assertions.assertEquals(SubscriptionTransitioningState.DELETED, - model.subscriptionStateOverrideActions().get(0).state()); - Assertions.assertEquals(SubscriptionNotificationOperation.BILLING_CANCELLATION, - model.subscriptionStateOverrideActions().get(0).action()); - Assertions.assertEquals(Duration.parse("PT151H58M7S"), model.softDeleteTtl()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesTemplateDeploymentOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesTemplateDeploymentOptionsTests.java deleted file mode 100644 index 1c7db007bc50..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationPropertiesTemplateDeploymentOptionsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.PreflightOption; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRegistrationPropertiesTemplateDeploymentOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRegistrationPropertiesTemplateDeploymentOptions model = BinaryData.fromString( - "{\"preflightSupported\":false,\"preflightOptions\":[\"None\",\"None\",\"ContinueDeploymentOnFailure\",\"None\"]}") - .toObject(ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.class); - Assertions.assertEquals(false, model.preflightSupported()); - Assertions.assertEquals(PreflightOption.NONE, model.preflightOptions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRegistrationPropertiesTemplateDeploymentOptions model - = new ResourceTypeRegistrationPropertiesTemplateDeploymentOptions().withPreflightSupported(false) - .withPreflightOptions(Arrays.asList(PreflightOption.NONE, PreflightOption.NONE, - PreflightOption.CONTINUE_DEPLOYMENT_ON_FAILURE, PreflightOption.NONE)); - model - = BinaryData.fromObject(model).toObject(ResourceTypeRegistrationPropertiesTemplateDeploymentOptions.class); - Assertions.assertEquals(false, model.preflightSupported()); - Assertions.assertEquals(PreflightOption.NONE, model.preflightOptions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteByResourceGroupWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 85a6e978b85a..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRegistrationsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceTypeRegistrationsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.resourceTypeRegistrations() - .deleteByResourceGroupWithResponse("s", "haep", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRequestHeaderOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRequestHeaderOptionsTests.java deleted file mode 100644 index 5f86ddfaa764..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeRequestHeaderOptionsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.OptInHeaderType; -import com.azure.resourcemanager.providerhub.models.ResourceTypeRequestHeaderOptions; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeRequestHeaderOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeRequestHeaderOptions model = BinaryData.fromString("{\"optInHeaders\":\"SignedAuxiliaryTokens\"}") - .toObject(ResourceTypeRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.SIGNED_AUXILIARY_TOKENS, model.optInHeaders()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeRequestHeaderOptions model - = new ResourceTypeRequestHeaderOptions().withOptInHeaders(OptInHeaderType.SIGNED_AUXILIARY_TOKENS); - model = BinaryData.fromObject(model).toObject(ResourceTypeRequestHeaderOptions.class); - Assertions.assertEquals(OptInHeaderType.SIGNED_AUXILIARY_TOKENS, model.optInHeaders()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeSkuTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeSkuTests.java deleted file mode 100644 index 16dc6430ce2d..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeSkuTests.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtendedLocationType; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.ResourceTypeSku; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import com.azure.resourcemanager.providerhub.models.SkuZoneDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeSku model = BinaryData.fromString( - "{\"skuSettings\":[{\"name\":\"eufuqyrxpdlcgql\",\"tier\":\"smjqfrddgam\",\"size\":\"hiosrsjuiv\",\"family\":\"disyirnxz\",\"kind\":\"zexrxzbujrt\",\"locations\":[\"vwrevkhgnlnzon\",\"lrpiqywnc\"],\"locationInfo\":[{\"location\":\"szcofizeht\",\"zones\":[\"bjkvreljeamu\",\"vzmlovuanashcxl\",\"mjerbdk\",\"lvidizozs\"],\"zoneDetails\":[{},{}],\"extendedLocations\":[\"jmonfdgn\",\"n\"],\"type\":\"NotSpecified\"},{\"location\":\"uuwwltv\",\"zones\":[\"ctzenkeifzzhmkd\",\"svflyhbxcudch\",\"gsrboldforobw\"],\"zoneDetails\":[{},{}],\"extendedLocations\":[\"bfhfovvacqp\",\"tuodxeszabbelaw\",\"muaslzkw\"],\"type\":\"NotSpecified\"},{\"location\":\"oycqucwy\",\"zones\":[\"nomdrkywuhpsv\",\"uurutlwexxwlalni\",\"xzsrzpge\"],\"zoneDetails\":[{},{},{}],\"extendedLocations\":[\"bwwpgdakchzy\"],\"type\":\"ArcZone\"},{\"location\":\"xqnrkcxk\",\"zones\":[\"nxm\"],\"zoneDetails\":[{},{},{}],\"extendedLocations\":[\"wq\",\"ntvlwijpsttexo\",\"qpwcyyufmh\"],\"type\":\"ArcZone\"}],\"requiredQuotaIds\":[\"wmqs\"],\"requiredFeatures\":[\"dqzh\",\"ctddun\",\"ndy\"],\"capacity\":{\"minimum\":1212474723,\"maximum\":2042763855,\"default\":811463724,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"cgegydcwbo\",\"quantity\":866043326,\"extendedUnit\":\"vqqolih\"},{\"meterId\":\"raiouaubrjtl\",\"quantity\":1702747573,\"extendedUnit\":\"uojrngiflr\"},{\"meterId\":\"pasccbi\",\"quantity\":1431120696,\"extendedUnit\":\"dlyjdf\"},{\"meterId\":\"wmkyoqufdvruzsl\",\"quantity\":15628056,\"extendedUnit\":\"pctf\"}],\"capabilities\":[{\"name\":\"xotngfdguge\",\"value\":\"zihgrkyu\"},{\"name\":\"zabs\",\"value\":\"mfp\"}]},{\"name\":\"hojeevy\",\"tier\":\"hsgz\",\"size\":\"zbgomfgbeg\",\"family\":\"gleohi\",\"kind\":\"tnluankrr\",\"locations\":[\"eebtijvacvb\",\"qzbqqxlajrnwxa\",\"evehjkuyxoaf\"],\"locationInfo\":[{\"location\":\"qltfaey\",\"zones\":[\"mfgvxirpghriypo\"],\"zoneDetails\":[{},{},{},{}],\"extendedLocations\":[\"qhykprlpyzn\",\"ciqdsme\",\"iitdfuxt\"],\"type\":\"NotSpecified\"},{\"location\":\"iibmi\",\"zones\":[\"nustgnljh\",\"mgixhcmavmqfou\"],\"zoneDetails\":[{}],\"extendedLocations\":[\"gyyprotwy\",\"undmbx\"],\"type\":\"ArcZone\"}],\"requiredQuotaIds\":[\"jkavl\",\"or\",\"mftpmdtz\",\"jltfvnzcyjtotpv\"],\"requiredFeatures\":[\"pbdbzqgqqi\",\"edsvqwthmk\",\"ibcysihsgqc\"],\"capacity\":{\"minimum\":1276799323,\"maximum\":1463060952,\"default\":1122650657,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"zsu\",\"quantity\":757345037,\"extendedUnit\":\"dxbzlmcmuap\"},{\"meterId\":\"vhdbevwqqxey\",\"quantity\":1923322437,\"extendedUnit\":\"qzinkfkbg\"}],\"capabilities\":[{\"name\":\"owxeqocljmy\",\"value\":\"vkzqk\"},{\"name\":\"jeokbzefezrxccz\",\"value\":\"rtle\"}]}],\"provisioningState\":\"Running\"}") - .toObject(ResourceTypeSku.class); - Assertions.assertEquals("eufuqyrxpdlcgql", model.skuSettings().get(0).name()); - Assertions.assertEquals("smjqfrddgam", model.skuSettings().get(0).tier()); - Assertions.assertEquals("hiosrsjuiv", model.skuSettings().get(0).size()); - Assertions.assertEquals("disyirnxz", model.skuSettings().get(0).family()); - Assertions.assertEquals("zexrxzbujrt", model.skuSettings().get(0).kind()); - Assertions.assertEquals("vwrevkhgnlnzon", model.skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("szcofizeht", model.skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("bjkvreljeamu", model.skuSettings().get(0).locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("jmonfdgn", - model.skuSettings().get(0).locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, - model.skuSettings().get(0).locationInfo().get(0).type()); - Assertions.assertEquals("wmqs", model.skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("dqzh", model.skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1212474723, model.skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(2042763855, model.skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(811463724, model.skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("cgegydcwbo", model.skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals(866043326, model.skuSettings().get(0).costs().get(0).quantity()); - Assertions.assertEquals("vqqolih", model.skuSettings().get(0).costs().get(0).extendedUnit()); - Assertions.assertEquals("xotngfdguge", model.skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("zihgrkyu", model.skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.RUNNING, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeSku model - = new ResourceTypeSku() - .withSkuSettings( - Arrays - .asList( - new SkuSetting().withName("eufuqyrxpdlcgql") - .withTier("smjqfrddgam") - .withSize("hiosrsjuiv") - .withFamily("disyirnxz") - .withKind("zexrxzbujrt") - .withLocations(Arrays.asList("vwrevkhgnlnzon", "lrpiqywnc")) - .withLocationInfo( - Arrays.asList( - new SkuLocationInfo().withLocation("szcofizeht") - .withZones(Arrays.asList("bjkvreljeamu", "vzmlovuanashcxl", "mjerbdk", - "lvidizozs")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("jmonfdgn", "n")) - .withType(ExtendedLocationType.NOT_SPECIFIED), - new SkuLocationInfo().withLocation("uuwwltv") - .withZones( - Arrays.asList("ctzenkeifzzhmkd", "svflyhbxcudch", "gsrboldforobw")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations( - Arrays.asList("bfhfovvacqp", "tuodxeszabbelaw", "muaslzkw")) - .withType(ExtendedLocationType.NOT_SPECIFIED), - new SkuLocationInfo().withLocation("oycqucwy") - .withZones(Arrays.asList("nomdrkywuhpsv", "uurutlwexxwlalni", "xzsrzpge")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), - new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("bwwpgdakchzy")) - .withType(ExtendedLocationType.ARC_ZONE), - new SkuLocationInfo().withLocation("xqnrkcxk") - .withZones(Arrays.asList("nxm")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), - new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("wq", "ntvlwijpsttexo", "qpwcyyufmh")) - .withType(ExtendedLocationType.ARC_ZONE))) - .withRequiredQuotaIds(Arrays.asList("wmqs")) - .withRequiredFeatures(Arrays.asList("dqzh", "ctddun", "ndy")) - .withCapacity(new SkuSettingCapacity() - .withMinimum(1212474723) - .withMaximum(2042763855) - .withDefaultProperty(811463724) - .withScaleType(SkuScaleType.AUTOMATIC)) - .withCosts(Arrays.asList(new SkuCost() - .withMeterId("cgegydcwbo") - .withQuantity(866043326) - .withExtendedUnit("vqqolih"), - new SkuCost().withMeterId("raiouaubrjtl") - .withQuantity(1702747573) - .withExtendedUnit("uojrngiflr"), - new SkuCost().withMeterId("pasccbi") - .withQuantity(1431120696) - .withExtendedUnit("dlyjdf"), - new SkuCost() - .withMeterId("wmkyoqufdvruzsl") - .withQuantity(15628056) - .withExtendedUnit("pctf"))) - .withCapabilities(Arrays.asList( - new SkuCapability().withName("xotngfdguge").withValue("zihgrkyu"), - new SkuCapability().withName("zabs").withValue("mfp"))), - new SkuSetting() - .withName("hojeevy") - .withTier("hsgz") - .withSize("zbgomfgbeg") - .withFamily("gleohi") - .withKind("tnluankrr") - .withLocations(Arrays.asList("eebtijvacvb", "qzbqqxlajrnwxa", "evehjkuyxoaf")) - .withLocationInfo(Arrays.asList( - new SkuLocationInfo().withLocation("qltfaey") - .withZones(Arrays.asList("mfgvxirpghriypo")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), - new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("qhykprlpyzn", "ciqdsme", "iitdfuxt")) - .withType(ExtendedLocationType.NOT_SPECIFIED), - new SkuLocationInfo().withLocation("iibmi") - .withZones(Arrays.asList("nustgnljh", "mgixhcmavmqfou")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("gyyprotwy", "undmbx")) - .withType(ExtendedLocationType.ARC_ZONE))) - .withRequiredQuotaIds(Arrays.asList("jkavl", "or", "mftpmdtz", "jltfvnzcyjtotpv")) - .withRequiredFeatures(Arrays.asList("pbdbzqgqqi", "edsvqwthmk", "ibcysihsgqc")) - .withCapacity(new SkuSettingCapacity().withMinimum(1276799323) - .withMaximum(1463060952) - .withDefaultProperty(1122650657) - .withScaleType(SkuScaleType.MANUAL)) - .withCosts(Arrays.asList( - new SkuCost().withMeterId("zsu") - .withQuantity(757345037) - .withExtendedUnit("dxbzlmcmuap"), - new SkuCost().withMeterId("vhdbevwqqxey") - .withQuantity(1923322437) - .withExtendedUnit("qzinkfkbg"))) - .withCapabilities( - Arrays.asList(new SkuCapability().withName("owxeqocljmy").withValue("vkzqk"), - new SkuCapability().withName("jeokbzefezrxccz").withValue("rtle"))))) - .withProvisioningState(ProvisioningState.RUNNING); - model = BinaryData.fromObject(model).toObject(ResourceTypeSku.class); - Assertions.assertEquals("eufuqyrxpdlcgql", model.skuSettings().get(0).name()); - Assertions.assertEquals("smjqfrddgam", model.skuSettings().get(0).tier()); - Assertions.assertEquals("hiosrsjuiv", model.skuSettings().get(0).size()); - Assertions.assertEquals("disyirnxz", model.skuSettings().get(0).family()); - Assertions.assertEquals("zexrxzbujrt", model.skuSettings().get(0).kind()); - Assertions.assertEquals("vwrevkhgnlnzon", model.skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("szcofizeht", model.skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("bjkvreljeamu", model.skuSettings().get(0).locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("jmonfdgn", - model.skuSettings().get(0).locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, - model.skuSettings().get(0).locationInfo().get(0).type()); - Assertions.assertEquals("wmqs", model.skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("dqzh", model.skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1212474723, model.skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(2042763855, model.skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(811463724, model.skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("cgegydcwbo", model.skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals(866043326, model.skuSettings().get(0).costs().get(0).quantity()); - Assertions.assertEquals("vqqolih", model.skuSettings().get(0).costs().get(0).extendedUnit()); - Assertions.assertEquals("xotngfdguge", model.skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("zihgrkyu", model.skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.RUNNING, model.provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeTemplateDeploymentPolicyTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeTemplateDeploymentPolicyTests.java deleted file mode 100644 index 1cd3a8c9b7f9..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ResourceTypeTemplateDeploymentPolicyTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ResourceTypeTemplateDeploymentPolicy; -import com.azure.resourcemanager.providerhub.models.TemplateDeploymentCapabilities; -import com.azure.resourcemanager.providerhub.models.TemplateDeploymentPreflightOptions; -import org.junit.jupiter.api.Assertions; - -public final class ResourceTypeTemplateDeploymentPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceTypeTemplateDeploymentPolicy model - = BinaryData.fromString("{\"capabilities\":\"Default\",\"preflightOptions\":\"RegisteredOnly\"}") - .toObject(ResourceTypeTemplateDeploymentPolicy.class); - Assertions.assertEquals(TemplateDeploymentCapabilities.DEFAULT, model.capabilities()); - Assertions.assertEquals(TemplateDeploymentPreflightOptions.REGISTERED_ONLY, model.preflightOptions()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceTypeTemplateDeploymentPolicy model - = new ResourceTypeTemplateDeploymentPolicy().withCapabilities(TemplateDeploymentCapabilities.DEFAULT) - .withPreflightOptions(TemplateDeploymentPreflightOptions.REGISTERED_ONLY); - model = BinaryData.fromObject(model).toObject(ResourceTypeTemplateDeploymentPolicy.class); - Assertions.assertEquals(TemplateDeploymentCapabilities.DEFAULT, model.capabilities()); - Assertions.assertEquals(TemplateDeploymentPreflightOptions.REGISTERED_ONLY, model.preflightOptions()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ServiceTreeInfoTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ServiceTreeInfoTests.java deleted file mode 100644 index 5e0187eedd39..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ServiceTreeInfoTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ServiceTreeInfo; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTreeInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceTreeInfo model = BinaryData.fromString("{\"serviceId\":\"ionpimexg\",\"componentId\":\"xgcp\"}") - .toObject(ServiceTreeInfo.class); - Assertions.assertEquals("ionpimexg", model.serviceId()); - Assertions.assertEquals("xgcp", model.componentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceTreeInfo model = new ServiceTreeInfo().withServiceId("ionpimexg").withComponentId("xgcp"); - model = BinaryData.fromObject(model).toObject(ServiceTreeInfo.class); - Assertions.assertEquals("ionpimexg", model.serviceId()); - Assertions.assertEquals("xgcp", model.componentId()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapabilityTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapabilityTests.java deleted file mode 100644 index 812a9a7359c2..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapabilityTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import org.junit.jupiter.api.Assertions; - -public final class SkuCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapability model = BinaryData.fromString("{\"name\":\"pttaqutd\",\"value\":\"wemxswvruunzz\"}") - .toObject(SkuCapability.class); - Assertions.assertEquals("pttaqutd", model.name()); - Assertions.assertEquals("wemxswvruunzz", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapability model = new SkuCapability().withName("pttaqutd").withValue("wemxswvruunzz"); - model = BinaryData.fromObject(model).toObject(SkuCapability.class); - Assertions.assertEquals("pttaqutd", model.name()); - Assertions.assertEquals("wemxswvruunzz", model.value()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapacityTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapacityTests.java deleted file mode 100644 index 4fcc48f783f3..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCapacityTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SkuCapacity; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import org.junit.jupiter.api.Assertions; - -public final class SkuCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapacity model = BinaryData - .fromString("{\"minimum\":236262537,\"maximum\":1043268546,\"default\":127250700,\"scaleType\":\"Manual\"}") - .toObject(SkuCapacity.class); - Assertions.assertEquals(236262537, model.minimum()); - Assertions.assertEquals(1043268546, model.maximum()); - Assertions.assertEquals(127250700, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = new SkuCapacity().withMinimum(236262537) - .withMaximum(1043268546) - .withDefaultProperty(127250700) - .withScaleType(SkuScaleType.MANUAL); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - Assertions.assertEquals(236262537, model.minimum()); - Assertions.assertEquals(1043268546, model.maximum()); - Assertions.assertEquals(127250700, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCostTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCostTests.java deleted file mode 100644 index 79cfd5b0b68c..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuCostTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import org.junit.jupiter.api.Assertions; - -public final class SkuCostTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCost model = BinaryData - .fromString("{\"meterId\":\"ffqyinlj\",\"quantity\":667642909,\"extendedUnit\":\"whixmonstsh\"}") - .toObject(SkuCost.class); - Assertions.assertEquals("ffqyinlj", model.meterId()); - Assertions.assertEquals(667642909, model.quantity()); - Assertions.assertEquals("whixmonstsh", model.extendedUnit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCost model = new SkuCost().withMeterId("ffqyinlj").withQuantity(667642909).withExtendedUnit("whixmonstsh"); - model = BinaryData.fromObject(model).toObject(SkuCost.class); - Assertions.assertEquals("ffqyinlj", model.meterId()); - Assertions.assertEquals(667642909, model.quantity()); - Assertions.assertEquals("whixmonstsh", model.extendedUnit()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuLocationInfoTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuLocationInfoTests.java deleted file mode 100644 index 826e4137a5d4..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuLocationInfoTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtendedLocationType; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuZoneDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuLocationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuLocationInfo model = BinaryData.fromString( - "{\"location\":\"ujlzqnhcvsqltn\",\"zones\":[\"bgsxgnxfyqonmpq\"],\"zoneDetails\":[{\"name\":[\"fdbxiqxeiiqbim\"],\"capabilities\":[{\"name\":\"wwinhehf\",\"value\":\"pofvwb\"},{\"name\":\"blembnkbwvqvxkd\",\"value\":\"vqihebwtswbzuwf\"},{\"name\":\"duragegizvc\",\"value\":\"felisdjub\"},{\"name\":\"gbqi\",\"value\":\"kxkbsazgakgacyr\"}]},{\"name\":[\"dmspof\",\"pv\",\"hryl\",\"iofrzgbzjedmstk\"],\"capabilities\":[{\"name\":\"v\",\"value\":\"bcuiiz\"}]},{\"name\":[\"wfansnvpdi\",\"mik\"],\"capabilities\":[{\"name\":\"bzbkiw\",\"value\":\"uqn\"},{\"name\":\"ophzfylsgcrp\",\"value\":\"bcunezzceze\"},{\"name\":\"fwyfwlwxjwet\",\"value\":\"psihcla\"},{\"name\":\"zvaylptrsqqw\",\"value\":\"tcmwqkchc\"}]}],\"extendedLocations\":[\"xfe\"],\"type\":\"NotSpecified\"}") - .toObject(SkuLocationInfo.class); - Assertions.assertEquals("ujlzqnhcvsqltn", model.location()); - Assertions.assertEquals("bgsxgnxfyqonmpq", model.zones().get(0)); - Assertions.assertEquals("fdbxiqxeiiqbim", model.zoneDetails().get(0).name().get(0)); - Assertions.assertEquals("wwinhehf", model.zoneDetails().get(0).capabilities().get(0).name()); - Assertions.assertEquals("pofvwb", model.zoneDetails().get(0).capabilities().get(0).value()); - Assertions.assertEquals("xfe", model.extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuLocationInfo model = new SkuLocationInfo().withLocation("ujlzqnhcvsqltn") - .withZones(Arrays.asList("bgsxgnxfyqonmpq")) - .withZoneDetails(Arrays.asList( - new SkuZoneDetail().withName(Arrays.asList("fdbxiqxeiiqbim")) - .withCapabilities(Arrays.asList(new SkuCapability().withName("wwinhehf").withValue("pofvwb"), - new SkuCapability().withName("blembnkbwvqvxkd").withValue("vqihebwtswbzuwf"), - new SkuCapability().withName("duragegizvc").withValue("felisdjub"), - new SkuCapability().withName("gbqi").withValue("kxkbsazgakgacyr"))), - new SkuZoneDetail().withName(Arrays.asList("dmspof", "pv", "hryl", "iofrzgbzjedmstk")) - .withCapabilities(Arrays.asList(new SkuCapability().withName("v").withValue("bcuiiz"))), - new SkuZoneDetail().withName(Arrays.asList("wfansnvpdi", "mik")) - .withCapabilities(Arrays.asList(new SkuCapability().withName("bzbkiw").withValue("uqn"), - new SkuCapability().withName("ophzfylsgcrp").withValue("bcunezzceze"), - new SkuCapability().withName("fwyfwlwxjwet").withValue("psihcla"), - new SkuCapability().withName("zvaylptrsqqw").withValue("tcmwqkchc"))))) - .withExtendedLocations(Arrays.asList("xfe")) - .withType(ExtendedLocationType.NOT_SPECIFIED); - model = BinaryData.fromObject(model).toObject(SkuLocationInfo.class); - Assertions.assertEquals("ujlzqnhcvsqltn", model.location()); - Assertions.assertEquals("bgsxgnxfyqonmpq", model.zones().get(0)); - Assertions.assertEquals("fdbxiqxeiiqbim", model.zoneDetails().get(0).name().get(0)); - Assertions.assertEquals("wwinhehf", model.zoneDetails().get(0).capabilities().get(0).name()); - Assertions.assertEquals("pofvwb", model.zoneDetails().get(0).capabilities().get(0).value()); - Assertions.assertEquals("xfe", model.extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, model.type()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceArrayResponseWithContinuationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceArrayResponseWithContinuationTests.java deleted file mode 100644 index ba9f36a07394..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceArrayResponseWithContinuationTests.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuResourceArrayResponseWithContinuation; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceArrayResponseWithContinuationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceArrayResponseWithContinuation model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"skuSettings\":[{\"name\":\"elfclducc\",\"tier\":\"rds\",\"size\":\"wcobie\",\"family\":\"tmninw\",\"kind\":\"zcilnghg\",\"locations\":[\"jjtbxqmuluxlxqz\",\"nersb\",\"cucrwnamikze\"],\"locationInfo\":[{\"location\":\"bsmswziqgf\"},{\"location\":\"hokzrusw\"}],\"requiredQuotaIds\":[\"czznvfbycjsxj\",\"wix\"],\"requiredFeatures\":[\"mwmxqhndvnoamld\",\"ehaohdjhh\",\"lzok\"],\"capacity\":{\"minimum\":434777672},\"costs\":[{\"meterId\":\"e\"},{\"meterId\":\"nje\"},{\"meterId\":\"agltsxoa\"}],\"capabilities\":[{\"name\":\"g\",\"value\":\"pnpbswveflocc\"},{\"name\":\"rmozihmipgawt\",\"value\":\"xp\"}]},{\"name\":\"y\",\"tier\":\"xcjxgrytfmpcy\",\"size\":\"lrmcaykg\",\"family\":\"oxuztrksx\",\"kind\":\"ndfcpfn\",\"locations\":[\"hjtwkjaosrx\",\"zvoamktc\"],\"locationInfo\":[{\"location\":\"smgbzahgxqdl\"}],\"requiredQuotaIds\":[\"ltlaprltzkatbhj\"],\"requiredFeatures\":[\"nbsoqeqalarv\",\"agunbtgfebw\",\"nbmhyree\"],\"capacity\":{\"minimum\":721207223},\"costs\":[{\"meterId\":\"vbpdqmjxlyyzglgo\"}],\"capabilities\":[{\"name\":\"lmjjyuo\",\"value\":\"qtobaxkjeyt\"}]}],\"provisioningState\":\"NotSpecified\"},\"id\":\"bfjkw\",\"name\":\"u\",\"type\":\"nkqbhsyrq\"},{\"properties\":{\"skuSettings\":[{\"name\":\"qhd\",\"tier\":\"xaulkpakdkifmjnn\",\"size\":\"tqabpxuckpgg\",\"family\":\"wey\",\"kind\":\"dhlisngwflqqmpi\",\"locations\":[\"w\",\"pqxpx\",\"wfcngjsaas\",\"ixtmkzjvkviirhgf\"],\"locationInfo\":[{\"location\":\"sdp\"},{\"location\":\"ra\"},{\"location\":\"zvzbglbyv\"}],\"requiredQuotaIds\":[\"ctbrxkjzwrgxffm\",\"hkwfbkgozxwop\",\"bydpizqaclnapxb\",\"yg\"],\"requiredFeatures\":[\"j\"],\"capacity\":{\"minimum\":1222669398},\"costs\":[{\"meterId\":\"fcttuxuuyilfl\"},{\"meterId\":\"oiquvrehmrnjhvs\"}],\"capabilities\":[{\"name\":\"tczytqjtwh\",\"value\":\"uunfprnjletlxsm\"},{\"name\":\"pddouifamowaziyn\",\"value\":\"nlqwzdvpiwhx\"}]},{\"name\":\"szdtmaajquh\",\"tier\":\"ylr\",\"size\":\"m\",\"family\":\"g\",\"kind\":\"mzyospspshck\",\"locations\":[\"jpmspbpssdfppy\",\"gt\",\"eyujtvczkcnyxrx\",\"unjdx\"],\"locationInfo\":[{\"location\":\"nkvxlxpaglqi\"},{\"location\":\"bgkc\"}],\"requiredQuotaIds\":[\"pzvuqdflvo\",\"iypfp\",\"bcpzgpxtivh\",\"knidib\"],\"requiredFeatures\":[\"xgpnr\",\"govfgpikqmhhaow\",\"rmzvupo\"],\"capacity\":{\"minimum\":1937297500},\"costs\":[{\"meterId\":\"uydzvk\"}],\"capabilities\":[{\"name\":\"cnqmxqpsw\",\"value\":\"kmvkhl\"},{\"name\":\"gdhbe\",\"value\":\"zqkzszuwi\"},{\"name\":\"tglxx\",\"value\":\"ljfp\"},{\"name\":\"picrmnzhrgmqgjsx\",\"value\":\"pqcbfrmbodthsq\"}]}],\"provisioningState\":\"Deleted\"},\"id\":\"riibakclacj\",\"name\":\"rnxousxauzlwvsg\",\"type\":\"wohqfzizvu\"},{\"properties\":{\"skuSettings\":[{\"name\":\"kjsvthnwpzteko\",\"tier\":\"ribi\",\"size\":\"tgplucfota\",\"family\":\"c\",\"kind\":\"nykzcugswvxwlm\",\"locations\":[\"m\",\"tx\"],\"locationInfo\":[{\"location\":\"xmcuqud\"},{\"location\":\"cvclxynpdk\"},{\"location\":\"gfabuiyjibuzphdu\"},{\"location\":\"neiknpg\"}],\"requiredQuotaIds\":[\"jiuqhibtozi\",\"qw\",\"edmurrxxge\"],\"requiredFeatures\":[\"tvqylkmqpzoyhlfb\",\"gwgcl\",\"xoe\",\"qinjipnwjf\"],\"capacity\":{\"minimum\":2010031498},\"costs\":[{\"meterId\":\"fcbahhp\"},{\"meterId\":\"pofoi\"}],\"capabilities\":[{\"name\":\"p\",\"value\":\"ilkmk\"}]}],\"provisioningState\":\"Canceled\"},\"id\":\"l\",\"name\":\"dndviauogp\",\"type\":\"uartvti\"},{\"properties\":{\"skuSettings\":[{\"name\":\"efchn\",\"tier\":\"ahmnxhkxjqirw\",\"size\":\"eooxffifh\",\"family\":\"rsnewmozqvbubqma\",\"kind\":\"sycxhxzgaz\",\"locations\":[\"boi\"],\"locationInfo\":[{\"location\":\"fqhppubowsep\"},{\"location\":\"fgkmtdhern\"},{\"location\":\"btcjuah\"}],\"requiredQuotaIds\":[\"tobkauxofshfph\",\"pnulaiywzej\",\"whslwkoj\"],\"requiredFeatures\":[\"ndnpdwrpqafgfug\"],\"capacity\":{\"minimum\":87564439},\"costs\":[{\"meterId\":\"yetefyp\"}],\"capabilities\":[{\"name\":\"ctfjgtixr\",\"value\":\"vzuyturmlmu\"},{\"name\":\"wolba\",\"value\":\"iropionszon\"},{\"name\":\"pngajin\",\"value\":\"ixjawrtm\"},{\"name\":\"fjmyccxlzhco\",\"value\":\"ovne\"}]},{\"name\":\"henlusfnr\",\"tier\":\"jxtxrdc\",\"size\":\"jvidttge\",\"family\":\"slvyjtcvuwkasi\",\"kind\":\"esfuught\",\"locations\":[\"ecjxe\",\"gtuhxuicbu\",\"wmrswnjlxuzrh\"],\"locationInfo\":[{\"location\":\"sxjb\"},{\"location\":\"qehgpd\"},{\"location\":\"hzjqatucoige\"}],\"requiredQuotaIds\":[\"cnwfepbnwgfmxjg\",\"g\",\"jbgdlfgtdysnaquf\"],\"requiredFeatures\":[\"ctqhamzjrwdk\",\"zeqyjleziun\",\"xdfzantkw\"],\"capacity\":{\"minimum\":1769138109},\"costs\":[{\"meterId\":\"mlbnseq\"},{\"meterId\":\"cjjvpilguooqja\"},{\"meterId\":\"m\"},{\"meterId\":\"itgueiookjbs\"}],\"capabilities\":[{\"name\":\"tdtpdelqacslmo\",\"value\":\"oebn\"},{\"name\":\"xofvcjk\",\"value\":\"dirazf\"},{\"name\":\"xejw\",\"value\":\"bmdujtmvcopexc\"}]}],\"provisioningState\":\"Succeeded\"},\"id\":\"rbuhhlky\",\"name\":\"ltqs\",\"type\":\"ogtu\"}],\"nextLink\":\"ffdjktsysidfvclg\"}") - .toObject(SkuResourceArrayResponseWithContinuation.class); - Assertions.assertEquals("elfclducc", model.value().get(0).properties().skuSettings().get(0).name()); - Assertions.assertEquals("rds", model.value().get(0).properties().skuSettings().get(0).tier()); - Assertions.assertEquals("wcobie", model.value().get(0).properties().skuSettings().get(0).size()); - Assertions.assertEquals("tmninw", model.value().get(0).properties().skuSettings().get(0).family()); - Assertions.assertEquals("zcilnghg", model.value().get(0).properties().skuSettings().get(0).kind()); - Assertions.assertEquals("jjtbxqmuluxlxqz", - model.value().get(0).properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("bsmswziqgf", - model.value().get(0).properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("czznvfbycjsxj", - model.value().get(0).properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("mwmxqhndvnoamld", - model.value().get(0).properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(434777672, model.value().get(0).properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals("e", model.value().get(0).properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("g", - model.value().get(0).properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("pnpbswveflocc", - model.value().get(0).properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("ffdjktsysidfvclg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceArrayResponseWithContinuation model - = new SkuResourceArrayResponseWithContinuation() - .withValue( - Arrays - .asList( - new SkuResourceInner().withProperties(new SkuResourceProperties() - .withSkuSettings(Arrays.asList(new SkuSetting().withName("elfclducc") - .withTier("rds") - .withSize("wcobie") - .withFamily("tmninw") - .withKind("zcilnghg") - .withLocations(Arrays.asList("jjtbxqmuluxlxqz", "nersb", "cucrwnamikze")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("bsmswziqgf"), - new SkuLocationInfo().withLocation("hokzrusw"))) - .withRequiredQuotaIds(Arrays.asList("czznvfbycjsxj", "wix")) - .withRequiredFeatures(Arrays.asList("mwmxqhndvnoamld", "ehaohdjhh", "lzok")) - .withCapacity(new SkuSettingCapacity().withMinimum(434777672)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("e"), - new SkuCost().withMeterId("nje"), new SkuCost().withMeterId("agltsxoa"))) - .withCapabilities( - Arrays.asList(new SkuCapability().withName("g").withValue("pnpbswveflocc"), - new SkuCapability().withName("rmozihmipgawt").withValue("xp"))), - new SkuSetting().withName("y") - .withTier("xcjxgrytfmpcy") - .withSize("lrmcaykg") - .withFamily("oxuztrksx") - .withKind("ndfcpfn") - .withLocations(Arrays.asList("hjtwkjaosrx", "zvoamktc")) - .withLocationInfo( - Arrays.asList(new SkuLocationInfo().withLocation("smgbzahgxqdl"))) - .withRequiredQuotaIds(Arrays.asList("ltlaprltzkatbhj")) - .withRequiredFeatures(Arrays.asList("nbsoqeqalarv", "agunbtgfebw", "nbmhyree")) - .withCapacity(new SkuSettingCapacity().withMinimum(721207223)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("vbpdqmjxlyyzglgo"))) - .withCapabilities(Arrays - .asList(new SkuCapability().withName("lmjjyuo").withValue("qtobaxkjeyt"))))) - .withProvisioningState(ProvisioningState.NOT_SPECIFIED)), - new SkuResourceInner() - .withProperties( - new SkuResourceProperties() - .withSkuSettings( - Arrays - .asList( - new SkuSetting().withName("qhd") - .withTier("xaulkpakdkifmjnn") - .withSize("tqabpxuckpgg") - .withFamily("wey") - .withKind("dhlisngwflqqmpi") - .withLocations(Arrays.asList("w", "pqxpx", "wfcngjsaas", - "ixtmkzjvkviirhgf")) - .withLocationInfo( - Arrays.asList(new SkuLocationInfo().withLocation("sdp"), - new SkuLocationInfo().withLocation("ra"), - new SkuLocationInfo().withLocation("zvzbglbyv"))) - .withRequiredQuotaIds(Arrays.asList("ctbrxkjzwrgxffm", - "hkwfbkgozxwop", "bydpizqaclnapxb", "yg")) - .withRequiredFeatures(Arrays.asList("j")) - .withCapacity(new SkuSettingCapacity().withMinimum(1222669398)) - .withCosts(Arrays.asList( - new SkuCost().withMeterId("fcttuxuuyilfl"), - new SkuCost().withMeterId("oiquvrehmrnjhvs"))) - .withCapabilities(Arrays.asList(new SkuCapability() - .withName("tczytqjtwh") - .withValue("uunfprnjletlxsm"), - new SkuCapability() - .withName("pddouifamowaziyn") - .withValue("nlqwzdvpiwhx"))), - new SkuSetting().withName("szdtmaajquh") - .withTier("ylr") - .withSize("m") - .withFamily("g") - .withKind("mzyospspshck") - .withLocations(Arrays.asList("jpmspbpssdfppy", "gt", - "eyujtvczkcnyxrx", "unjdx")) - .withLocationInfo(Arrays.asList( - new SkuLocationInfo().withLocation("nkvxlxpaglqi"), - new SkuLocationInfo().withLocation("bgkc"))) - .withRequiredQuotaIds(Arrays.asList("pzvuqdflvo", "iypfp", - "bcpzgpxtivh", "knidib")) - .withRequiredFeatures( - Arrays.asList("xgpnr", "govfgpikqmhhaow", "rmzvupo")) - .withCapacity(new SkuSettingCapacity().withMinimum(1937297500)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("uydzvk"))) - .withCapabilities(Arrays.asList( - new SkuCapability().withName("cnqmxqpsw") - .withValue("kmvkhl"), - new SkuCapability().withName("gdhbe") - .withValue("zqkzszuwi"), - new SkuCapability().withName("tglxx").withValue("ljfp"), - new SkuCapability().withName("picrmnzhrgmqgjsx") - .withValue("pqcbfrmbodthsq"))))) - .withProvisioningState(ProvisioningState.DELETED)), - new SkuResourceInner().withProperties(new SkuResourceProperties() - .withSkuSettings(Arrays.asList(new SkuSetting().withName("kjsvthnwpzteko") - .withTier("ribi") - .withSize("tgplucfota") - .withFamily("c") - .withKind("nykzcugswvxwlm") - .withLocations(Arrays.asList("m", "tx")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("xmcuqud"), - new SkuLocationInfo().withLocation("cvclxynpdk"), - new SkuLocationInfo().withLocation("gfabuiyjibuzphdu"), - new SkuLocationInfo().withLocation("neiknpg"))) - .withRequiredQuotaIds(Arrays.asList("jiuqhibtozi", "qw", "edmurrxxge")) - .withRequiredFeatures( - Arrays.asList("tvqylkmqpzoyhlfb", "gwgcl", "xoe", "qinjipnwjf")) - .withCapacity(new SkuSettingCapacity().withMinimum(2010031498)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("fcbahhp"), - new SkuCost().withMeterId("pofoi"))) - .withCapabilities(Arrays.asList(new SkuCapability() - .withName("p") - .withValue("ilkmk"))))) - .withProvisioningState(ProvisioningState.CANCELED)), - new SkuResourceInner() - .withProperties( - new SkuResourceProperties() - .withSkuSettings( - Arrays.asList( - new SkuSetting().withName("efchn") - .withTier("ahmnxhkxjqirw") - .withSize("eooxffifh") - .withFamily("rsnewmozqvbubqma") - .withKind("sycxhxzgaz") - .withLocations(Arrays.asList("boi")) - .withLocationInfo(Arrays.asList( - new SkuLocationInfo().withLocation("fqhppubowsep"), - new SkuLocationInfo().withLocation("fgkmtdhern"), - new SkuLocationInfo().withLocation("btcjuah"))) - .withRequiredQuotaIds( - Arrays.asList("tobkauxofshfph", "pnulaiywzej", "whslwkoj")) - .withRequiredFeatures(Arrays.asList("ndnpdwrpqafgfug")) - .withCapacity(new SkuSettingCapacity().withMinimum(87564439)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("yetefyp"))) - .withCapabilities(Arrays.asList( - new SkuCapability().withName("ctfjgtixr") - .withValue("vzuyturmlmu"), - new SkuCapability().withName("wolba").withValue("iropionszon"), - new SkuCapability().withName("pngajin").withValue("ixjawrtm"), - new SkuCapability() - .withName("fjmyccxlzhco") - .withValue("ovne"))), - new SkuSetting().withName("henlusfnr") - .withTier("jxtxrdc") - .withSize("jvidttge") - .withFamily("slvyjtcvuwkasi") - .withKind("esfuught") - .withLocations( - Arrays.asList("ecjxe", "gtuhxuicbu", "wmrswnjlxuzrh")) - .withLocationInfo( - Arrays.asList(new SkuLocationInfo().withLocation("sxjb"), - new SkuLocationInfo().withLocation("qehgpd"), - new SkuLocationInfo().withLocation("hzjqatucoige"))) - .withRequiredQuotaIds( - Arrays.asList("cnwfepbnwgfmxjg", "g", "jbgdlfgtdysnaquf")) - .withRequiredFeatures( - Arrays.asList("ctqhamzjrwdk", "zeqyjleziun", "xdfzantkw")) - .withCapacity(new SkuSettingCapacity().withMinimum(1769138109)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("mlbnseq"), - new SkuCost().withMeterId("cjjvpilguooqja"), - new SkuCost().withMeterId("m"), - new SkuCost().withMeterId("itgueiookjbs"))) - .withCapabilities(Arrays.asList( - new SkuCapability().withName("tdtpdelqacslmo") - .withValue("oebn"), - new SkuCapability().withName("xofvcjk").withValue("dirazf"), - new SkuCapability().withName("xejw") - .withValue("bmdujtmvcopexc"))))) - .withProvisioningState(ProvisioningState.SUCCEEDED)))) - .withNextLink("ffdjktsysidfvclg"); - model = BinaryData.fromObject(model).toObject(SkuResourceArrayResponseWithContinuation.class); - Assertions.assertEquals("elfclducc", model.value().get(0).properties().skuSettings().get(0).name()); - Assertions.assertEquals("rds", model.value().get(0).properties().skuSettings().get(0).tier()); - Assertions.assertEquals("wcobie", model.value().get(0).properties().skuSettings().get(0).size()); - Assertions.assertEquals("tmninw", model.value().get(0).properties().skuSettings().get(0).family()); - Assertions.assertEquals("zcilnghg", model.value().get(0).properties().skuSettings().get(0).kind()); - Assertions.assertEquals("jjtbxqmuluxlxqz", - model.value().get(0).properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("bsmswziqgf", - model.value().get(0).properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("czznvfbycjsxj", - model.value().get(0).properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("mwmxqhndvnoamld", - model.value().get(0).properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(434777672, model.value().get(0).properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals("e", model.value().get(0).properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("g", - model.value().get(0).properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("pnpbswveflocc", - model.value().get(0).properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("ffdjktsysidfvclg", model.nextLink()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceInnerTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceInnerTests.java deleted file mode 100644 index 0b6ff9d602f0..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourceInnerTests.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.providerhub.models.ExtendedLocationType; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import com.azure.resourcemanager.providerhub.models.SkuZoneDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceInner model = BinaryData.fromString( - "{\"properties\":{\"skuSettings\":[{\"name\":\"glae\",\"tier\":\"ndtic\",\"size\":\"pvz\",\"family\":\"qtmldgxo\",\"kind\":\"irclnpk\",\"locations\":[\"yzriykhy\",\"wf\"],\"locationInfo\":[{\"location\":\"b\",\"zones\":[\"vkjlmxhom\",\"ynhdwdigum\",\"nraauzz\"],\"zoneDetails\":[{},{},{},{}],\"extendedLocations\":[\"ysdzhez\",\"wva\"],\"type\":\"NotSpecified\"},{\"location\":\"uvvfonkp\",\"zones\":[\"yik\",\"y\"],\"zoneDetails\":[{}],\"extendedLocations\":[\"vluwmncsttij\",\"y\",\"vpo\"],\"type\":\"NotSpecified\"},{\"location\":\"sgsgbdhu\",\"zones\":[\"njdgkynscliq\",\"zvhxnk\",\"mtk\",\"bo\"],\"zoneDetails\":[{},{}],\"extendedLocations\":[\"dxzxhi\",\"frbbc\",\"vqagtltdhlf\",\"qojpy\"],\"type\":\"EdgeZone\"}],\"requiredQuotaIds\":[\"dcnifmz\",\"sdymbrn\",\"suxmpraf\"],\"requiredFeatures\":[\"khocxvdfffwaf\"],\"capacity\":{\"minimum\":1487295222,\"maximum\":1019115621,\"default\":1181286444,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"h\",\"quantity\":597801422,\"extendedUnit\":\"bunzozudh\"}],\"capabilities\":[{\"name\":\"kmoyxcdyuibh\",\"value\":\"fdn\"},{\"name\":\"zydvfvf\",\"value\":\"jnaeois\"},{\"name\":\"vhmgorffukis\",\"value\":\"vwmzhwplefaxvxil\"},{\"name\":\"btgn\",\"value\":\"nzeyqxtjj\"}]},{\"name\":\"zqlqhyc\",\"tier\":\"odggx\",\"size\":\"ee\",\"family\":\"ieknl\",\"kind\":\"riaa\",\"locations\":[\"agy\",\"wqfbylyrfgiagt\",\"ojocqwogf\",\"zjvusfzldmo\"],\"locationInfo\":[{\"location\":\"ylfsbtk\",\"zones\":[\"ysownbtgkbug\",\"jqctojcmisofie\"],\"zoneDetails\":[{},{},{}],\"extendedLocations\":[\"jy\",\"dh\",\"u\",\"lcplc\"],\"type\":\"EdgeZone\"},{\"location\":\"ihih\",\"zones\":[\"dsqtzbsrgnowcjh\",\"gmvecactxmw\",\"teyowclu\",\"ovekqvgqouwi\"],\"zoneDetails\":[{}],\"extendedLocations\":[\"wyivqikf\"],\"type\":\"EdgeZone\"}],\"requiredQuotaIds\":[\"fsphuagrttikt\",\"usqczkvy\",\"lxubyj\"],\"requiredFeatures\":[\"mmfblcqcuubgqib\",\"talmett\",\"wgdsl\"],\"capacity\":{\"minimum\":1446225762,\"maximum\":1370784391,\"default\":719469590,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"qseypxiutcxa\",\"quantity\":1361435323,\"extendedUnit\":\"rpetogebjoxsl\"}],\"capabilities\":[{\"name\":\"hlabrq\",\"value\":\"kkzjcjbtrga\"}]}],\"provisioningState\":\"Canceled\"},\"id\":\"vibr\",\"name\":\"jj\",\"type\":\"toqbeitpkxztmoob\"}") - .toObject(SkuResourceInner.class); - Assertions.assertEquals("glae", model.properties().skuSettings().get(0).name()); - Assertions.assertEquals("ndtic", model.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("pvz", model.properties().skuSettings().get(0).size()); - Assertions.assertEquals("qtmldgxo", model.properties().skuSettings().get(0).family()); - Assertions.assertEquals("irclnpk", model.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("yzriykhy", model.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("b", model.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("vkjlmxhom", - model.properties().skuSettings().get(0).locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("ysdzhez", - model.properties().skuSettings().get(0).locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, - model.properties().skuSettings().get(0).locationInfo().get(0).type()); - Assertions.assertEquals("dcnifmz", model.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("khocxvdfffwaf", model.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1487295222, model.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(1019115621, model.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1181286444, model.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("h", model.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals(597801422, model.properties().skuSettings().get(0).costs().get(0).quantity()); - Assertions.assertEquals("bunzozudh", model.properties().skuSettings().get(0).costs().get(0).extendedUnit()); - Assertions.assertEquals("kmoyxcdyuibh", model.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("fdn", model.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.CANCELED, model.properties().provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceInner model - = new SkuResourceInner() - .withProperties( - new SkuResourceProperties() - .withSkuSettings( - Arrays.asList( - new SkuSetting().withName("glae") - .withTier("ndtic") - .withSize("pvz") - .withFamily("qtmldgxo") - .withKind("irclnpk") - .withLocations(Arrays.asList("yzriykhy", "wf")) - .withLocationInfo(Arrays.asList( - new SkuLocationInfo().withLocation("b") - .withZones(Arrays.asList("vkjlmxhom", "ynhdwdigum", "nraauzz")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), - new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("ysdzhez", "wva")) - .withType(ExtendedLocationType.NOT_SPECIFIED), - new SkuLocationInfo().withLocation("uvvfonkp") - .withZones(Arrays.asList("yik", "y")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("vluwmncsttij", "y", "vpo")) - .withType(ExtendedLocationType.NOT_SPECIFIED), - new SkuLocationInfo().withLocation("sgsgbdhu") - .withZones(Arrays.asList("njdgkynscliq", "zvhxnk", "mtk", "bo")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations( - Arrays.asList("dxzxhi", "frbbc", "vqagtltdhlf", "qojpy")) - .withType(ExtendedLocationType.EDGE_ZONE))) - .withRequiredQuotaIds(Arrays.asList("dcnifmz", "sdymbrn", "suxmpraf")) - .withRequiredFeatures(Arrays.asList("khocxvdfffwaf")) - .withCapacity(new SkuSettingCapacity().withMinimum(1487295222) - .withMaximum(1019115621) - .withDefaultProperty(1181286444) - .withScaleType(SkuScaleType.MANUAL)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("h") - .withQuantity(597801422) - .withExtendedUnit("bunzozudh"))) - .withCapabilities( - Arrays.asList(new SkuCapability().withName("kmoyxcdyuibh").withValue("fdn"), - new SkuCapability().withName("zydvfvf").withValue("jnaeois"), - new SkuCapability().withName("vhmgorffukis") - .withValue("vwmzhwplefaxvxil"), - new SkuCapability().withName("btgn").withValue("nzeyqxtjj"))), - new SkuSetting().withName("zqlqhyc") - .withTier("odggx") - .withSize("ee") - .withFamily("ieknl") - .withKind("riaa") - .withLocations(Arrays.asList("agy", "wqfbylyrfgiagt", "ojocqwogf", "zjvusfzldmo")) - .withLocationInfo(Arrays.asList( - new SkuLocationInfo().withLocation("ylfsbtk") - .withZones(Arrays.asList("ysownbtgkbug", "jqctojcmisofie")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), - new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("jy", "dh", "u", "lcplc")) - .withType(ExtendedLocationType.EDGE_ZONE), - new SkuLocationInfo().withLocation("ihih") - .withZones(Arrays - .asList("dsqtzbsrgnowcjh", "gmvecactxmw", "teyowclu", "ovekqvgqouwi")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("wyivqikf")) - .withType(ExtendedLocationType.EDGE_ZONE))) - .withRequiredQuotaIds(Arrays.asList("fsphuagrttikt", "usqczkvy", "lxubyj")) - .withRequiredFeatures(Arrays.asList("mmfblcqcuubgqib", "talmett", "wgdsl")) - .withCapacity(new SkuSettingCapacity().withMinimum(1446225762) - .withMaximum(1370784391) - .withDefaultProperty(719469590) - .withScaleType(SkuScaleType.AUTOMATIC)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("qseypxiutcxa") - .withQuantity(1361435323) - .withExtendedUnit("rpetogebjoxsl"))) - .withCapabilities(Arrays - .asList(new SkuCapability().withName("hlabrq").withValue("kkzjcjbtrga"))))) - .withProvisioningState(ProvisioningState.CANCELED)); - model = BinaryData.fromObject(model).toObject(SkuResourceInner.class); - Assertions.assertEquals("glae", model.properties().skuSettings().get(0).name()); - Assertions.assertEquals("ndtic", model.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("pvz", model.properties().skuSettings().get(0).size()); - Assertions.assertEquals("qtmldgxo", model.properties().skuSettings().get(0).family()); - Assertions.assertEquals("irclnpk", model.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("yzriykhy", model.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("b", model.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("vkjlmxhom", - model.properties().skuSettings().get(0).locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("ysdzhez", - model.properties().skuSettings().get(0).locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, - model.properties().skuSettings().get(0).locationInfo().get(0).type()); - Assertions.assertEquals("dcnifmz", model.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("khocxvdfffwaf", model.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1487295222, model.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(1019115621, model.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1181286444, model.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("h", model.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals(597801422, model.properties().skuSettings().get(0).costs().get(0).quantity()); - Assertions.assertEquals("bunzozudh", model.properties().skuSettings().get(0).costs().get(0).extendedUnit()); - Assertions.assertEquals("kmoyxcdyuibh", model.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("fdn", model.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.CANCELED, model.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourcePropertiesTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourcePropertiesTests.java deleted file mode 100644 index bc0c9d9c8b58..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuResourcePropertiesTests.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtendedLocationType; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import com.azure.resourcemanager.providerhub.models.SkuZoneDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceProperties model = BinaryData.fromString( - "{\"skuSettings\":[{\"name\":\"ft\",\"tier\":\"gfcwqmpimaqxzhem\",\"size\":\"h\",\"family\":\"uj\",\"kind\":\"t\",\"locations\":[\"zzwc\",\"lkb\",\"wpfaj\"],\"locationInfo\":[{\"location\":\"ltlwtjjguktalhs\",\"zones\":[\"cdmxzrpoaiml\",\"wiaaomylweaz\",\"lcsethwwnpj\",\"l\"],\"zoneDetails\":[{},{},{},{}],\"extendedLocations\":[\"ch\",\"ahfbous\"],\"type\":\"ArcZone\"},{\"location\":\"pgfewetwlyx\",\"zones\":[\"xykxhdj\"],\"zoneDetails\":[{},{}],\"extendedLocations\":[\"bcxf\",\"bcporxvxcjzhqizx\",\"pxtgqscjav\"],\"type\":\"NotSpecified\"},{\"location\":\"uhdqazk\",\"zones\":[\"guwpi\"],\"zoneDetails\":[{}],\"extendedLocations\":[\"ivmmghfcfiwrxgk\",\"euvyinzqodfvpgs\"],\"type\":\"EdgeZone\"},{\"location\":\"gsgbpfgzdjt\",\"zones\":[\"flbqvgaq\",\"lgafcqusrdve\"],\"zoneDetails\":[{},{},{}],\"extendedLocations\":[\"tutnwlduycvuzhyr\",\"ewipm\",\"ekdxuku\"],\"type\":\"EdgeZone\"}],\"requiredQuotaIds\":[\"xundxgk\",\"twzhhzjhfjmhv\",\"muvgp\",\"uneqsxvmhf\"],\"requiredFeatures\":[\"jyihsasbhudypo\"],\"capacity\":{\"minimum\":1579321844,\"maximum\":439629797,\"default\":189904532,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"yrpfoobrlttymsj\",\"quantity\":221167933,\"extendedUnit\":\"dnfwqzdzg\"}],\"capabilities\":[{\"name\":\"axhnfh\",\"value\":\"lyvijouwiv\"}]},{\"name\":\"xoyzunbix\",\"tier\":\"ti\",\"size\":\"cpwpg\",\"family\":\"rc\",\"kind\":\"tso\",\"locations\":[\"kenx\",\"m\"],\"locationInfo\":[{\"location\":\"frpmpdnqqskaw\",\"zones\":[\"vmm\",\"npqfrtqlkzmeg\"],\"zoneDetails\":[{},{},{}],\"extendedLocations\":[\"kxlzyqdrfeg\",\"ealzxwhcansymoyq\"],\"type\":\"ArcZone\"}],\"requiredQuotaIds\":[\"divb\",\"bxgomfaj\",\"wasqvdaeyyg\"],\"requiredFeatures\":[\"kjsqzhzbezkgi\",\"sidxasicdd\"],\"capacity\":{\"minimum\":83141311,\"maximum\":1032831795,\"default\":848656816,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"wa\",\"quantity\":1761289407,\"extendedUnit\":\"atjeaahh\"}],\"capabilities\":[{\"name\":\"hnakzyb\",\"value\":\"jjidjk\"},{\"name\":\"yxkyxvx\",\"value\":\"vblbjednljlageua\"},{\"name\":\"lxunsmjbnkppxy\",\"value\":\"enlsvxeizzgwkln\"}]},{\"name\":\"rmffeyc\",\"tier\":\"ktp\",\"size\":\"merteeammxqiek\",\"family\":\"zddrt\",\"kind\":\"doj\",\"locations\":[\"vavrefdees\"],\"locationInfo\":[{\"location\":\"uij\",\"zones\":[\"xs\"],\"zoneDetails\":[{},{},{}],\"extendedLocations\":[\"ujwsawddjibabxvi\",\"itvtzeexavo\",\"tfgle\"],\"type\":\"EdgeZone\"},{\"location\":\"dqbwpypqtgsfja\",\"zones\":[\"lhhxudbxvodhtnsi\",\"ud\",\"z\"],\"zoneDetails\":[{}],\"extendedLocations\":[\"kdlpa\",\"zrcxfailcfxwmdbo\"],\"type\":\"ArcZone\"}],\"requiredQuotaIds\":[\"ft\",\"fqob\",\"jln\",\"cgcckknhxkizvyt\"],\"requiredFeatures\":[\"vuljraaeranokqg\",\"kkjqnvbroylaxxu\"],\"capacity\":{\"minimum\":1519356417,\"maximum\":1094688808,\"default\":2065681131,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"jsvg\",\"quantity\":1047902295,\"extendedUnit\":\"r\"}],\"capabilities\":[{\"name\":\"cytdclxgccknfnwm\",\"value\":\"tmvpdvjdhtt\"}]},{\"name\":\"a\",\"tier\":\"edxihchrphkmcrj\",\"size\":\"nsdfzpbgtgky\",\"family\":\"dgh\",\"kind\":\"euutlwxezwzh\",\"locations\":[\"bwnhhtql\",\"ehgpp\"],\"locationInfo\":[{\"location\":\"fhpfeoajvgcxtx\",\"zones\":[\"heafidlt\",\"gsresmkssj\"],\"zoneDetails\":[{},{}],\"extendedLocations\":[\"xfkfwegprhptill\",\"cbiqtgdqoh\"],\"type\":\"NotSpecified\"},{\"location\":\"sldrizetpwbral\",\"zones\":[\"bphbqzmizakakank\"],\"zoneDetails\":[{},{}],\"extendedLocations\":[\"zhajoylhjlmuo\",\"xprimrsop\"],\"type\":\"EdgeZone\"}],\"requiredQuotaIds\":[\"meisls\"],\"requiredFeatures\":[\"sylwxdzaumweooh\",\"uufuz\"],\"capacity\":{\"minimum\":93570001,\"maximum\":1286826443,\"default\":1730791386,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"lbaemwmdxmeb\",\"quantity\":8048243,\"extendedUnit\":\"jpahlxvea\"},{\"meterId\":\"f\",\"quantity\":180775994,\"extendedUnit\":\"wmqtibx\"},{\"meterId\":\"ijddtvqc\",\"quantity\":1118270051,\"extendedUnit\":\"ijaeukm\"}],\"capabilities\":[{\"name\":\"eekpndz\",\"value\":\"apm\"},{\"name\":\"dqmeqwigpibudq\",\"value\":\"yxeb\"},{\"name\":\"ybpmzznrtffyaq\",\"value\":\"tmhheioqa\"}]}],\"provisioningState\":\"Canceled\"}") - .toObject(SkuResourceProperties.class); - Assertions.assertEquals("ft", model.skuSettings().get(0).name()); - Assertions.assertEquals("gfcwqmpimaqxzhem", model.skuSettings().get(0).tier()); - Assertions.assertEquals("h", model.skuSettings().get(0).size()); - Assertions.assertEquals("uj", model.skuSettings().get(0).family()); - Assertions.assertEquals("t", model.skuSettings().get(0).kind()); - Assertions.assertEquals("zzwc", model.skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("ltlwtjjguktalhs", model.skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("cdmxzrpoaiml", model.skuSettings().get(0).locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("ch", model.skuSettings().get(0).locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.ARC_ZONE, model.skuSettings().get(0).locationInfo().get(0).type()); - Assertions.assertEquals("xundxgk", model.skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("jyihsasbhudypo", model.skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1579321844, model.skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(439629797, model.skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(189904532, model.skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("yrpfoobrlttymsj", model.skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals(221167933, model.skuSettings().get(0).costs().get(0).quantity()); - Assertions.assertEquals("dnfwqzdzg", model.skuSettings().get(0).costs().get(0).extendedUnit()); - Assertions.assertEquals("axhnfh", model.skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("lyvijouwiv", model.skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceProperties model = new SkuResourceProperties() - .withSkuSettings(Arrays.asList( - new SkuSetting().withName("ft") - .withTier("gfcwqmpimaqxzhem") - .withSize("h") - .withFamily("uj") - .withKind("t") - .withLocations(Arrays.asList("zzwc", "lkb", "wpfaj")) - .withLocationInfo(Arrays.asList( - new SkuLocationInfo().withLocation("ltlwtjjguktalhs") - .withZones(Arrays.asList("cdmxzrpoaiml", "wiaaomylweaz", "lcsethwwnpj", "l")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), - new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("ch", "ahfbous")) - .withType(ExtendedLocationType.ARC_ZONE), - new SkuLocationInfo().withLocation("pgfewetwlyx") - .withZones(Arrays.asList("xykxhdj")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("bcxf", "bcporxvxcjzhqizx", "pxtgqscjav")) - .withType(ExtendedLocationType.NOT_SPECIFIED), - new SkuLocationInfo().withLocation("uhdqazk") - .withZones(Arrays.asList("guwpi")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("ivmmghfcfiwrxgk", "euvyinzqodfvpgs")) - .withType(ExtendedLocationType.EDGE_ZONE), - new SkuLocationInfo().withLocation("gsgbpfgzdjt") - .withZones(Arrays.asList("flbqvgaq", "lgafcqusrdve")) - .withZoneDetails( - Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("tutnwlduycvuzhyr", "ewipm", "ekdxuku")) - .withType(ExtendedLocationType.EDGE_ZONE))) - .withRequiredQuotaIds(Arrays.asList("xundxgk", "twzhhzjhfjmhv", "muvgp", "uneqsxvmhf")) - .withRequiredFeatures(Arrays.asList("jyihsasbhudypo")) - .withCapacity(new SkuSettingCapacity().withMinimum(1579321844) - .withMaximum(439629797) - .withDefaultProperty(189904532) - .withScaleType(SkuScaleType.AUTOMATIC)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("yrpfoobrlttymsj") - .withQuantity(221167933) - .withExtendedUnit("dnfwqzdzg"))) - .withCapabilities(Arrays.asList(new SkuCapability().withName("axhnfh").withValue("lyvijouwiv"))), - new SkuSetting().withName("xoyzunbix") - .withTier("ti") - .withSize("cpwpg") - .withFamily("rc") - .withKind("tso") - .withLocations(Arrays.asList("kenx", "m")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("frpmpdnqqskaw") - .withZones(Arrays.asList("vmm", "npqfrtqlkzmeg")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("kxlzyqdrfeg", "ealzxwhcansymoyq")) - .withType(ExtendedLocationType.ARC_ZONE))) - .withRequiredQuotaIds(Arrays.asList("divb", "bxgomfaj", "wasqvdaeyyg")) - .withRequiredFeatures(Arrays.asList("kjsqzhzbezkgi", "sidxasicdd")) - .withCapacity(new SkuSettingCapacity().withMinimum(83141311) - .withMaximum(1032831795) - .withDefaultProperty(848656816) - .withScaleType(SkuScaleType.AUTOMATIC)) - .withCosts(Arrays - .asList(new SkuCost().withMeterId("wa").withQuantity(1761289407).withExtendedUnit("atjeaahh"))) - .withCapabilities( - Arrays - .asList(new SkuCapability().withName("hnakzyb").withValue("jjidjk"), - new SkuCapability().withName( - "yxkyxvx").withValue("vblbjednljlageua"), - new SkuCapability().withName("lxunsmjbnkppxy").withValue("enlsvxeizzgwkln"))), - new SkuSetting().withName("rmffeyc") - .withTier("ktp") - .withSize("merteeammxqiek") - .withFamily("zddrt") - .withKind("doj") - .withLocations(Arrays.asList("vavrefdees")) - .withLocationInfo( - Arrays.asList( - new SkuLocationInfo().withLocation("uij") - .withZones(Arrays.asList("xs")) - .withZoneDetails( - Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("ujwsawddjibabxvi", "itvtzeexavo", "tfgle")) - .withType(ExtendedLocationType.EDGE_ZONE), - new SkuLocationInfo().withLocation("dqbwpypqtgsfja") - .withZones(Arrays.asList("lhhxudbxvodhtnsi", "ud", "z")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("kdlpa", "zrcxfailcfxwmdbo")) - .withType(ExtendedLocationType.ARC_ZONE))) - .withRequiredQuotaIds(Arrays.asList("ft", "fqob", "jln", "cgcckknhxkizvyt")) - .withRequiredFeatures(Arrays.asList("vuljraaeranokqg", "kkjqnvbroylaxxu")) - .withCapacity( - new SkuSettingCapacity() - .withMinimum(1519356417) - .withMaximum(1094688808) - .withDefaultProperty(2065681131) - .withScaleType(SkuScaleType.MANUAL)) - .withCosts( - Arrays.asList(new SkuCost().withMeterId("jsvg").withQuantity(1047902295).withExtendedUnit("r"))) - .withCapabilities( - Arrays.asList(new SkuCapability().withName("cytdclxgccknfnwm").withValue("tmvpdvjdhtt"))), - new SkuSetting().withName("a") - .withTier("edxihchrphkmcrj") - .withSize("nsdfzpbgtgky") - .withFamily("dgh") - .withKind("euutlwxezwzh") - .withLocations(Arrays.asList("bwnhhtql", "ehgpp")) - .withLocationInfo(Arrays.asList( - new SkuLocationInfo().withLocation("fhpfeoajvgcxtx") - .withZones(Arrays.asList("heafidlt", "gsresmkssj")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("xfkfwegprhptill", "cbiqtgdqoh")) - .withType(ExtendedLocationType.NOT_SPECIFIED), - new SkuLocationInfo().withLocation("sldrizetpwbral") - .withZones(Arrays.asList("bphbqzmizakakank")) - .withZoneDetails(Arrays.asList(new SkuZoneDetail(), new SkuZoneDetail())) - .withExtendedLocations(Arrays.asList("zhajoylhjlmuo", "xprimrsop")) - .withType(ExtendedLocationType.EDGE_ZONE))) - .withRequiredQuotaIds(Arrays.asList("meisls")) - .withRequiredFeatures(Arrays.asList("sylwxdzaumweooh", "uufuz")) - .withCapacity(new SkuSettingCapacity().withMinimum(93570001) - .withMaximum(1286826443) - .withDefaultProperty(1730791386) - .withScaleType(SkuScaleType.NONE)) - .withCosts(Arrays.asList( - new SkuCost().withMeterId("lbaemwmdxmeb").withQuantity(8048243).withExtendedUnit("jpahlxvea"), - new SkuCost().withMeterId("f").withQuantity(180775994).withExtendedUnit("wmqtibx"), - new SkuCost().withMeterId("ijddtvqc").withQuantity(1118270051).withExtendedUnit("ijaeukm"))) - .withCapabilities(Arrays.asList(new SkuCapability().withName("eekpndz").withValue("apm"), - new SkuCapability().withName("dqmeqwigpibudq").withValue("yxeb"), - new SkuCapability().withName("ybpmzznrtffyaq").withValue("tmhheioqa"))))) - .withProvisioningState(ProvisioningState.CANCELED); - model = BinaryData.fromObject(model).toObject(SkuResourceProperties.class); - Assertions.assertEquals("ft", model.skuSettings().get(0).name()); - Assertions.assertEquals("gfcwqmpimaqxzhem", model.skuSettings().get(0).tier()); - Assertions.assertEquals("h", model.skuSettings().get(0).size()); - Assertions.assertEquals("uj", model.skuSettings().get(0).family()); - Assertions.assertEquals("t", model.skuSettings().get(0).kind()); - Assertions.assertEquals("zzwc", model.skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("ltlwtjjguktalhs", model.skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("cdmxzrpoaiml", model.skuSettings().get(0).locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("ch", model.skuSettings().get(0).locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.ARC_ZONE, model.skuSettings().get(0).locationInfo().get(0).type()); - Assertions.assertEquals("xundxgk", model.skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("jyihsasbhudypo", model.skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1579321844, model.skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(439629797, model.skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(189904532, model.skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("yrpfoobrlttymsj", model.skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals(221167933, model.skuSettings().get(0).costs().get(0).quantity()); - Assertions.assertEquals("dnfwqzdzg", model.skuSettings().get(0).costs().get(0).extendedUnit()); - Assertions.assertEquals("axhnfh", model.skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("lyvijouwiv", model.skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.CANCELED, model.provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingCapacityTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingCapacityTests.java deleted file mode 100644 index 7f86b68cf6d5..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingCapacityTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import org.junit.jupiter.api.Assertions; - -public final class SkuSettingCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuSettingCapacity model = BinaryData - .fromString( - "{\"minimum\":1918015991,\"maximum\":1339132065,\"default\":1982534081,\"scaleType\":\"Manual\"}") - .toObject(SkuSettingCapacity.class); - Assertions.assertEquals(1918015991, model.minimum()); - Assertions.assertEquals(1339132065, model.maximum()); - Assertions.assertEquals(1982534081, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuSettingCapacity model = new SkuSettingCapacity().withMinimum(1918015991) - .withMaximum(1339132065) - .withDefaultProperty(1982534081) - .withScaleType(SkuScaleType.MANUAL); - model = BinaryData.fromObject(model).toObject(SkuSettingCapacity.class); - Assertions.assertEquals(1918015991, model.minimum()); - Assertions.assertEquals(1339132065, model.maximum()); - Assertions.assertEquals(1982534081, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingTests.java deleted file mode 100644 index cbeb11988f21..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuSettingTests.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ExtendedLocationType; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import com.azure.resourcemanager.providerhub.models.SkuZoneDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuSetting model = BinaryData.fromString( - "{\"name\":\"xbkwv\",\"tier\":\"nzvdfbzdixzmq\",\"size\":\"odawopqhewjptmcg\",\"family\":\"ostzelndlatu\",\"kind\":\"zlbiojlvfhrbbpn\",\"locations\":[\"cwwyyur\",\"ochpprpr\",\"nmokayzejnhlbk\",\"bzpcpiljhahzvec\"],\"locationInfo\":[{\"location\":\"bnwieholew\",\"zones\":[\"uubw\",\"fqsfa\",\"aqtferr\"],\"zoneDetails\":[{\"name\":[\"kmfx\",\"pjwogqqno\",\"pud\"],\"capabilities\":[{\"name\":\"btqwpwyawbzas\",\"value\":\"bucljgkyexaogu\"},{\"name\":\"aipidsdaultxi\",\"value\":\"jumfqwazlnq\"},{\"name\":\"mcjn\",\"value\":\"zqdqxt\"},{\"name\":\"jw\",\"value\":\"nyfusfzsvtuikzh\"}]}],\"extendedLocations\":[\"glcfhmlrqryxyn\",\"nzrdpsovwxz\",\"ptgoeiybbabp\",\"hv\"],\"type\":\"NotSpecified\"}],\"requiredQuotaIds\":[\"ntjlr\",\"gjkskyrioov\",\"idsxwaabzmifry\"],\"requiredFeatures\":[\"mmaxrizkzobgo\",\"xlhslnel\",\"ieixynllxe\"],\"capacity\":{\"minimum\":1222388745,\"maximum\":2008141079,\"default\":1839785994,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"cawjutifdwfmvi\",\"quantity\":817044673,\"extendedUnit\":\"jbt\"},{\"meterId\":\"zhraglkafh\",\"quantity\":1272146098,\"extendedUnit\":\"ujeickp\"},{\"meterId\":\"vcpopmxe\",\"quantity\":62072923,\"extendedUnit\":\"ltyjedexxmlfmk\"},{\"meterId\":\"scazuawxtzxpu\",\"quantity\":1528230497,\"extendedUnit\":\"bzxrvxcushsphai\"}],\"capabilities\":[{\"name\":\"yasflvgsgzwy\",\"value\":\"akoi\"},{\"name\":\"knsmjblmljhlnymz\",\"value\":\"tqyryuzcbmqqv\"},{\"name\":\"mv\",\"value\":\"fgtayxonsup\"}]}") - .toObject(SkuSetting.class); - Assertions.assertEquals("xbkwv", model.name()); - Assertions.assertEquals("nzvdfbzdixzmq", model.tier()); - Assertions.assertEquals("odawopqhewjptmcg", model.size()); - Assertions.assertEquals("ostzelndlatu", model.family()); - Assertions.assertEquals("zlbiojlvfhrbbpn", model.kind()); - Assertions.assertEquals("cwwyyur", model.locations().get(0)); - Assertions.assertEquals("bnwieholew", model.locationInfo().get(0).location()); - Assertions.assertEquals("uubw", model.locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("kmfx", model.locationInfo().get(0).zoneDetails().get(0).name().get(0)); - Assertions.assertEquals("btqwpwyawbzas", - model.locationInfo().get(0).zoneDetails().get(0).capabilities().get(0).name()); - Assertions.assertEquals("bucljgkyexaogu", - model.locationInfo().get(0).zoneDetails().get(0).capabilities().get(0).value()); - Assertions.assertEquals("glcfhmlrqryxyn", model.locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, model.locationInfo().get(0).type()); - Assertions.assertEquals("ntjlr", model.requiredQuotaIds().get(0)); - Assertions.assertEquals("mmaxrizkzobgo", model.requiredFeatures().get(0)); - Assertions.assertEquals(1222388745, model.capacity().minimum()); - Assertions.assertEquals(2008141079, model.capacity().maximum()); - Assertions.assertEquals(1839785994, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.NONE, model.capacity().scaleType()); - Assertions.assertEquals("cawjutifdwfmvi", model.costs().get(0).meterId()); - Assertions.assertEquals(817044673, model.costs().get(0).quantity()); - Assertions.assertEquals("jbt", model.costs().get(0).extendedUnit()); - Assertions.assertEquals("yasflvgsgzwy", model.capabilities().get(0).name()); - Assertions.assertEquals("akoi", model.capabilities().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuSetting model - = new SkuSetting().withName("xbkwv") - .withTier("nzvdfbzdixzmq") - .withSize("odawopqhewjptmcg") - .withFamily("ostzelndlatu") - .withKind("zlbiojlvfhrbbpn") - .withLocations(Arrays.asList("cwwyyur", "ochpprpr", "nmokayzejnhlbk", "bzpcpiljhahzvec")) - .withLocationInfo( - Arrays.asList(new SkuLocationInfo().withLocation("bnwieholew") - .withZones(Arrays.asList("uubw", "fqsfa", "aqtferr")) - .withZoneDetails( - Arrays.asList(new SkuZoneDetail().withName(Arrays.asList("kmfx", "pjwogqqno", "pud")) - .withCapabilities(Arrays.asList( - new SkuCapability().withName("btqwpwyawbzas").withValue("bucljgkyexaogu"), - new SkuCapability().withName("aipidsdaultxi").withValue("jumfqwazlnq"), - new SkuCapability().withName("mcjn").withValue("zqdqxt"), - new SkuCapability().withName("jw").withValue("nyfusfzsvtuikzh"))))) - .withExtendedLocations(Arrays.asList("glcfhmlrqryxyn", "nzrdpsovwxz", "ptgoeiybbabp", "hv")) - .withType(ExtendedLocationType.NOT_SPECIFIED))) - .withRequiredQuotaIds(Arrays.asList("ntjlr", "gjkskyrioov", "idsxwaabzmifry")) - .withRequiredFeatures(Arrays.asList("mmaxrizkzobgo", "xlhslnel", "ieixynllxe")) - .withCapacity(new SkuSettingCapacity().withMinimum(1222388745) - .withMaximum(2008141079) - .withDefaultProperty(1839785994) - .withScaleType(SkuScaleType.NONE)) - .withCosts(Arrays.asList( - new SkuCost().withMeterId("cawjutifdwfmvi").withQuantity(817044673).withExtendedUnit("jbt"), - new SkuCost().withMeterId("zhraglkafh").withQuantity(1272146098).withExtendedUnit("ujeickp"), - new SkuCost().withMeterId("vcpopmxe").withQuantity(62072923).withExtendedUnit("ltyjedexxmlfmk"), - new SkuCost().withMeterId("scazuawxtzxpu") - .withQuantity(1528230497) - .withExtendedUnit("bzxrvxcushsphai"))) - .withCapabilities(Arrays.asList(new SkuCapability().withName("yasflvgsgzwy").withValue("akoi"), - new SkuCapability().withName("knsmjblmljhlnymz").withValue("tqyryuzcbmqqv"), - new SkuCapability().withName("mv").withValue("fgtayxonsup"))); - model = BinaryData.fromObject(model).toObject(SkuSetting.class); - Assertions.assertEquals("xbkwv", model.name()); - Assertions.assertEquals("nzvdfbzdixzmq", model.tier()); - Assertions.assertEquals("odawopqhewjptmcg", model.size()); - Assertions.assertEquals("ostzelndlatu", model.family()); - Assertions.assertEquals("zlbiojlvfhrbbpn", model.kind()); - Assertions.assertEquals("cwwyyur", model.locations().get(0)); - Assertions.assertEquals("bnwieholew", model.locationInfo().get(0).location()); - Assertions.assertEquals("uubw", model.locationInfo().get(0).zones().get(0)); - Assertions.assertEquals("kmfx", model.locationInfo().get(0).zoneDetails().get(0).name().get(0)); - Assertions.assertEquals("btqwpwyawbzas", - model.locationInfo().get(0).zoneDetails().get(0).capabilities().get(0).name()); - Assertions.assertEquals("bucljgkyexaogu", - model.locationInfo().get(0).zoneDetails().get(0).capabilities().get(0).value()); - Assertions.assertEquals("glcfhmlrqryxyn", model.locationInfo().get(0).extendedLocations().get(0)); - Assertions.assertEquals(ExtendedLocationType.NOT_SPECIFIED, model.locationInfo().get(0).type()); - Assertions.assertEquals("ntjlr", model.requiredQuotaIds().get(0)); - Assertions.assertEquals("mmaxrizkzobgo", model.requiredFeatures().get(0)); - Assertions.assertEquals(1222388745, model.capacity().minimum()); - Assertions.assertEquals(2008141079, model.capacity().maximum()); - Assertions.assertEquals(1839785994, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.NONE, model.capacity().scaleType()); - Assertions.assertEquals("cawjutifdwfmvi", model.costs().get(0).meterId()); - Assertions.assertEquals(817044673, model.costs().get(0).quantity()); - Assertions.assertEquals("jbt", model.costs().get(0).extendedUnit()); - Assertions.assertEquals("yasflvgsgzwy", model.capabilities().get(0).name()); - Assertions.assertEquals("akoi", model.capabilities().get(0).value()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuZoneDetailTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuZoneDetailTests.java deleted file mode 100644 index 31e6f3d720aa..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkuZoneDetailTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuZoneDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuZoneDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuZoneDetail model = BinaryData.fromString( - "{\"name\":[\"exfdeqvhpsylk\",\"shk\",\"ffmbmxzjrg\"],\"capabilities\":[{\"name\":\"pgjxsnptfujgicga\",\"value\":\"o\"}]}") - .toObject(SkuZoneDetail.class); - Assertions.assertEquals("exfdeqvhpsylk", model.name().get(0)); - Assertions.assertEquals("pgjxsnptfujgicga", model.capabilities().get(0).name()); - Assertions.assertEquals("o", model.capabilities().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuZoneDetail model = new SkuZoneDetail().withName(Arrays.asList("exfdeqvhpsylk", "shk", "ffmbmxzjrg")) - .withCapabilities(Arrays.asList(new SkuCapability().withName("pgjxsnptfujgicga").withValue("o"))); - model = BinaryData.fromObject(model).toObject(SkuZoneDetail.class); - Assertions.assertEquals("exfdeqvhpsylk", model.name().get(0)); - Assertions.assertEquals("pgjxsnptfujgicga", model.capabilities().get(0).name()); - Assertions.assertEquals("o", model.capabilities().get(0).value()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstWithResponseMockTests.java deleted file mode 100644 index 6b06870a6567..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeFirstWithResponseMockTests.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusCreateOrUpdateNestedResourceTypeFirstWithResponseMockTests { - @Test - public void testCreateOrUpdateNestedResourceTypeFirstWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"igijiitnspxlz\",\"tier\":\"sygrijwa\",\"size\":\"fanraybfu\",\"family\":\"frojsydgr\",\"kind\":\"dkygywezski\",\"locations\":[\"f\",\"gzmxieqv\",\"smaklixqcahy\",\"xalybxawoijpo\"],\"locationInfo\":[{\"location\":\"lxp\"},{\"location\":\"kwjdjodqhy\"},{\"location\":\"incnr\"},{\"location\":\"mehllizhceu\"}],\"requiredQuotaIds\":[\"odkadppyibngq\",\"adywrxwhydt\",\"uvvadswzsnu\",\"emlowuowhl\"],\"requiredFeatures\":[\"wyrmouv\",\"lgmokzkl\"],\"capacity\":{\"minimum\":2037693383,\"maximum\":390070308,\"default\":1284555207,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"vlihcvjd\"},{\"meterId\":\"qcrj\"},{\"meterId\":\"dhftukvhdxlwy\"},{\"meterId\":\"jbfqzdk\"}],\"capabilities\":[{\"name\":\"yixhafratqxmb\",\"value\":\"roumzznva\"},{\"name\":\"qjrhuzgfxonj\",\"value\":\"pusllywpv\"}]},{\"name\":\"iotzbpdbollgryfq\",\"tier\":\"asigrowsocne\",\"size\":\"ygdjboqgrmtqjk\",\"family\":\"vadrmm\",\"kind\":\"uawvcmjzk\",\"locations\":[\"disczskos\",\"oqiqazugamx\",\"krrcoiisbamnpp\"],\"locationInfo\":[{\"location\":\"kuztdsbezaxyfu\"},{\"location\":\"zxuizhyhnepkpe\"},{\"location\":\"iarxqiubxdukec\"}],\"requiredQuotaIds\":[\"azvdhctmmkosz\",\"dblnsntrp\",\"aqkiofkb\"],\"requiredFeatures\":[\"hklbnldpvcbh\",\"ezyquw\"],\"capacity\":{\"minimum\":1536472820,\"maximum\":1486681451,\"default\":349544662,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"uyu\"}],\"capabilities\":[{\"name\":\"vlm\",\"value\":\"jwcolbm\"},{\"name\":\"lbnwtpcpahp\",\"value\":\"z\"},{\"name\":\"vxhmtfhocnxzcmj\",\"value\":\"ngxno\"},{\"name\":\"rxtd\",\"value\":\"sn\"}]},{\"name\":\"evhdlmydid\",\"tier\":\"epfwwt\",\"size\":\"doesxxhmwcdb\",\"family\":\"yo\",\"kind\":\"xkxhnegknjzrbhtm\",\"locations\":[\"vukaobrlbpgsnb\",\"gnc\",\"jhgem\"],\"locationInfo\":[{\"location\":\"akywalhjymxcgqta\"},{\"location\":\"drclssoljome\"},{\"location\":\"tfy\"},{\"location\":\"nlbvgjcodkk\"}],\"requiredQuotaIds\":[\"iytssikizbc\"],\"requiredFeatures\":[\"bvntnrgmqsorhce\"],\"capacity\":{\"minimum\":1540955255,\"maximum\":1114161467,\"default\":404619068,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"wzvmdoksqd\"},{\"meterId\":\"iw\"},{\"meterId\":\"wxlboncqbazqicq\"},{\"meterId\":\"hygtv\"}],\"capabilities\":[{\"name\":\"janepubdpkx\",\"value\":\"qvgx\"},{\"name\":\"aodetv\",\"value\":\"hkxdxuwsaifmc\"},{\"name\":\"nosbz\",\"value\":\"ehgcvkbcknjo\"}]},{\"name\":\"gjyy\",\"tier\":\"velsz\",\"size\":\"qzevxoqeint\",\"family\":\"aljglzobl\",\"kind\":\"aafrqulhmzyqbhd\",\"locations\":[\"jrqpjiyrqjcrga\",\"wmzwdfkbnrzorpdl\",\"bqc\"],\"locationInfo\":[{\"location\":\"fg\"},{\"location\":\"xsaetg\"},{\"location\":\"dgvpyig\"}],\"requiredQuotaIds\":[\"qilzdc\"],\"requiredFeatures\":[\"joedx\"],\"capacity\":{\"minimum\":1780634429,\"maximum\":899036768,\"default\":1394719160,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"wwgilfjqqacdm\"},{\"meterId\":\"xwxdcvjwc\"}],\"capabilities\":[{\"name\":\"akeciqchx\",\"value\":\"tuicds\"},{\"name\":\"wdfmmpzhzzwvywr\",\"value\":\"yngydgrpxncaki\"}]}],\"provisioningState\":\"NotSpecified\"},\"id\":\"ndjrkclamggl\",\"name\":\"lmf\",\"type\":\"jdoq\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response = manager.skus() - .createOrUpdateNestedResourceTypeFirstWithResponse("mxitpfinzcpd", "tkrlgjmtbd", "vcqguefzh", "mpheqdur", - new SkuResourceInner().withProperties(new SkuResourceProperties() - .withSkuSettings(Arrays.asList( - new SkuSetting().withName("ujlfyoumpcky") - .withTier("lcdi") - .withSize("tajbrz") - .withFamily("xucycijoclxi") - .withKind("gjcyzyzjdnrq") - .withLocations(Arrays.asList("xjeaoqaqbzgyh", "w", "v", "atbwbqam")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("liys"), - new SkuLocationInfo().withLocation("pkcvmwf"), - new SkuLocationInfo().withLocation("uxx"))) - .withRequiredQuotaIds(Arrays.asList("ywbo")) - .withRequiredFeatures(Arrays.asList("qmiciijqp")) - .withCapacity(new SkuSettingCapacity().withMinimum(1691281722) - .withMaximum(1276736582) - .withDefaultProperty(1736738271) - .withScaleType(SkuScaleType.NONE)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("myqwixvcpwnkwywz"), - new SkuCost().withMeterId("ofalickduoiqtam"), new SkuCost().withMeterId("yvsk"), - new SkuCost().withMeterId("xrwzawnvsbcf"))) - .withCapabilities( - Arrays.asList(new SkuCapability().withName("gxnvhyc").withValue("dimwrzregzgyu"), - new SkuCapability().withName("utrwpweryekz").withValue("dhme"), - new SkuCapability().withName("tta").withValue("jyosxwwh"), - new SkuCapability().withName("h").withValue("tfvpndpmiljpn"))), - new SkuSetting().withName("ynudqllzsa") - .withTier("pjlxeehuxiqhzl") - .withSize("yme") - .withFamily("lskihmxrfdsajred") - .withKind("yyshtuwgmevua") - .withLocations(Arrays.asList("zyifrkgwltx", "qipxgzdyimsf")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("rpravkjogeslab"), - new SkuLocationInfo().withLocation("smjkwynqxaekqsy"), - new SkuLocationInfo().withLocation("vwjtqpkevmyltjc"))) - .withRequiredQuotaIds(Arrays.asList("xklurcclfgxannno", "t", "posew")) - .withRequiredFeatures(Arrays.asList("pxvkqma", "pxvpifdfaif", "zyzeyuubeidsz", "fytoi")) - .withCapacity(new SkuSettingCapacity().withMinimum(1084180231) - .withMaximum(1707176301) - .withDefaultProperty(219744218) - .withScaleType(SkuScaleType.NONE)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("dihoyn"), - new SkuCost().withMeterId("rxwe"), new SkuCost().withMeterId("wkd"))) - .withCapabilities( - Arrays.asList(new SkuCapability().withName("rucpcunnuz").withValue("qumoeno"), - new SkuCapability().withName("naie").withValue("hqhsknd"), - new SkuCapability().withName("elqkaadlkn").withValue("foanniyopetx"), - new SkuCapability().withName("vcnrly").withValue("nucaephblkwqpat"))), - new SkuSetting().withName("bqsdtcjbctvi") - .withTier("zqymtuowogtgits") - .withSize("zvbrzcdbanfzndsc") - .withFamily("xeatkd") - .withKind("wnrdjyibqbnaom") - .withLocations(Arrays.asList("mk", "hmaxljalfi")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("mobcan"), - new SkuLocationInfo().withLocation("de"))) - .withRequiredQuotaIds(Arrays.asList("cwg", "xf", "vaknokzwjj", "r")) - .withRequiredFeatures(Arrays.asList("xldzyyfytpqsix", "mmpuj", "vyqlkjuvsmbmslzo")) - .withCapacity(new SkuSettingCapacity().withMinimum(292588041) - .withMaximum(1431539140) - .withDefaultProperty(243700219) - .withScaleType(SkuScaleType.NONE)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("befgvmxn"))) - .withCapabilities(Arrays.asList(new SkuCapability().withName("vtlubsesk").withValue("cua"), - new SkuCapability().withName("t").withValue("hunlpirykycnd"), - new SkuCapability().withName("fqivj").withValue("euy"))), - new SkuSetting().withName("bbmnwagltb") - .withTier("eeonqlnfwm") - .withSize("mvqdbpbhfckdvez") - .withFamily("cssbzhddu") - .withKind("nqfblhkalehpava") - .withLocations(Arrays.asList("iqjtiogqgdmin", "ctteajohi", "gspnbonhpczykm")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("vw"))) - .withRequiredQuotaIds(Arrays.asList("sehch", "hufmpq", "mqyjgy")) - .withRequiredFeatures(Arrays.asList("lod", "aeuzanh", "fnhsenwphp", "fngq")) - .withCapacity(new SkuSettingCapacity().withMinimum(290667189) - .withMaximum(1809951616) - .withDefaultProperty(1731697979) - .withScaleType(SkuScaleType.AUTOMATIC)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("jufwbeqrkuorhtss"))) - .withCapabilities(Arrays.asList(new SkuCapability().withName("nmdvha").withValue("c"), - new SkuCapability().withName("jy").withValue("iqswbqer"), - new SkuCapability().withName("w").withValue("iytxt"))))) - .withProvisioningState(ProvisioningState.DELETED)), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("igijiitnspxlz", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("sygrijwa", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("fanraybfu", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("frojsydgr", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("dkygywezski", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("f", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("lxp", response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("odkadppyibngq", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("wyrmouv", response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(2037693383, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(390070308, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1284555207, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.NONE, response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("vlihcvjd", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("yixhafratqxmb", - response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("roumzznva", response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondWithResponseMockTests.java deleted file mode 100644 index 17119848a07e..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeSecondWithResponseMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusCreateOrUpdateNestedResourceTypeSecondWithResponseMockTests { - @Test - public void testCreateOrUpdateNestedResourceTypeSecondWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"mrzoep\",\"tier\":\"wdvwnjkgvfnmx\",\"size\":\"rsqftib\",\"family\":\"ibuyvpirf\",\"kind\":\"pnqn\",\"locations\":[\"sbede\"],\"locationInfo\":[{\"location\":\"xkxbhxvu\"},{\"location\":\"nul\"}],\"requiredQuotaIds\":[\"hjevd\"],\"requiredFeatures\":[\"fajs\"],\"capacity\":{\"minimum\":1219985620,\"maximum\":183150913,\"default\":1133822985,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"vyhjrl\"},{\"meterId\":\"izjixlq\"},{\"meterId\":\"hefkwabsolronqq\"},{\"meterId\":\"mgnlqxsjxtel\"}],\"capabilities\":[{\"name\":\"vuqbozoo\",\"value\":\"zqocarku\"},{\"name\":\"lbcnndt\",\"value\":\"nx\"}]},{\"name\":\"wqy\",\"tier\":\"lhdyzmyckzex\",\"size\":\"akckywym\",\"family\":\"aabjkdtfohfao\",\"kind\":\"vkiwrsiwdyjqu\",\"locations\":[\"crraueekcsu\"],\"locationInfo\":[{\"location\":\"gdda\"}],\"requiredQuotaIds\":[\"bgydlqidywm\",\"mptyrilkfbnrqqxv\"],\"requiredFeatures\":[\"bnfnqtxjtoma\",\"swbnfddepldwqjns\"],\"capacity\":{\"minimum\":1832889654,\"maximum\":799123872,\"default\":587916896,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"mywhsb\"},{\"meterId\":\"carycsjjzyvoaqa\"},{\"meterId\":\"uvehzptd\"},{\"meterId\":\"krrbhmpful\"}],\"capabilities\":[{\"name\":\"fgybpmfbf\",\"value\":\"nunmpzkrv\"},{\"name\":\"yifkdschlzvf\",\"value\":\"ctnkjjwgcwnph\"},{\"name\":\"kgf\",\"value\":\"rtogmhmj\"},{\"name\":\"jsc\",\"value\":\"fp\"}]},{\"name\":\"qwtygevgwmseharx\",\"tier\":\"vqnrxtmbpj\",\"size\":\"nvwjhrsidqpxl\",\"family\":\"pakftngatwm\",\"kind\":\"yutrymd\",\"locations\":[\"jhp\"],\"locationInfo\":[{\"location\":\"jqdvdwkqpldrlefg\"},{\"location\":\"aavuagntetaout\"},{\"location\":\"pdctuhspfefyi\"}],\"requiredQuotaIds\":[\"yeuyldph\",\"tybkcgs\"],\"requiredFeatures\":[\"hllnmwynefxe\"],\"capacity\":{\"minimum\":291211491,\"maximum\":110653977,\"default\":666857233,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"rl\"},{\"meterId\":\"mdskjhhxdlajfoxc\"},{\"meterId\":\"scv\"}],\"capabilities\":[{\"name\":\"lh\",\"value\":\"a\"},{\"name\":\"krmukmyjmkxett\",\"value\":\"slojfkqidnqt\"},{\"name\":\"qxjhqxcsqhtkbtnq\",\"value\":\"rngl\"}]}],\"provisioningState\":\"RolloutInProgress\"},\"id\":\"iipsnawwlqkz\",\"name\":\"xhhllxricct\",\"type\":\"wmuqqoajxeiygle\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response = manager.skus() - .createOrUpdateNestedResourceTypeSecondWithResponse("abmvmsxbaevwjc", "kottlwuhvajmailf", "mjjz", - "kzwjiqullq", "bdmvrscmqerndbr", - new SkuResourceInner().withProperties(new SkuResourceProperties() - .withSkuSettings(Arrays.asList(new SkuSetting().withName("ofltfnnxrkadjfy") - .withTier("fmu") - .withSize("iripfohyk") - .withFamily("xbbcbrw") - .withKind("u") - .withLocations(Arrays.asList("jizbeew", "iy")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("zbju"), - new SkuLocationInfo().withLocation("rsrziuctix"), - new SkuLocationInfo().withLocation("bdsuifr"))) - .withRequiredQuotaIds( - Arrays.asList("aapezkiswqjmdghs", "parybjufpt", "jczjnciuiyqv", "daswvpp")) - .withRequiredFeatures(Arrays.asList("qzlgcndhzxrrfcfs", "hkhg", "nxu")) - .withCapacity(new SkuSettingCapacity().withMinimum(446800244) - .withMaximum(704078862) - .withDefaultProperty(77482590) - .withScaleType(SkuScaleType.AUTOMATIC)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("xlb"))) - .withCapabilities(Arrays.asList(new SkuCapability().withName("meikj").withValue("lwzacn"), - new SkuCapability().withName("wpfsuqtaaz").withValue("qbxyxoyfpuqqi"))))) - .withProvisioningState(ProvisioningState.CREATED)), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mrzoep", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("wdvwnjkgvfnmx", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("rsqftib", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("ibuyvpirf", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("pnqn", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("sbede", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("xkxbhxvu", - response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("hjevd", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("fajs", response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1219985620, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(183150913, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1133822985, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.NONE, response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("vyhjrl", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("vuqbozoo", response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("zqocarku", response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.ROLLOUT_IN_PROGRESS, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdWithResponseMockTests.java deleted file mode 100644 index eeff04dbac7b..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateNestedResourceTypeThirdWithResponseMockTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusCreateOrUpdateNestedResourceTypeThirdWithResponseMockTests { - @Test - public void testCreateOrUpdateNestedResourceTypeThirdWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"n\",\"tier\":\"be\",\"size\":\"gis\",\"family\":\"wnykdidjchlrmpw\",\"kind\":\"ofldseacdhz\",\"locations\":[\"brfgdrwji\",\"ewhfjsrwqrxetf\",\"cwv\"],\"locationInfo\":[{\"location\":\"dqntycnawthv\"},{\"location\":\"ax\"},{\"location\":\"nuyeamcmhud\"}],\"requiredQuotaIds\":[\"cehokw\",\"pqtwloesqrggvrb\"],\"requiredFeatures\":[\"ukoila\",\"iduw\"],\"capacity\":{\"minimum\":111210342,\"maximum\":844410077,\"default\":518669807,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"p\"},{\"meterId\":\"ruzythqkkwhbg\"},{\"meterId\":\"vellvulnxdmnitm\"}],\"capabilities\":[{\"name\":\"tvmcly\",\"value\":\"mffhmjpddnyxfzuv\"}]},{\"name\":\"zmzqmzjqrb\",\"tier\":\"vnmdyfoeboj\",\"size\":\"pp\",\"family\":\"aohoqkpjtnq\",\"kind\":\"l\",\"locations\":[\"kdcwmqsyrilmhx\",\"qaolfylnkkbjpjv\"],\"locationInfo\":[{\"location\":\"ltm\"},{\"location\":\"wob\"},{\"location\":\"jw\"},{\"location\":\"lwyjfnqzocrdz\"}],\"requiredQuotaIds\":[\"euntgxdncaqtti\",\"koifuvnyttz\"],\"requiredFeatures\":[\"gyrihlgm\",\"behlqtxnr\",\"lkndrndpgfjodh\",\"aqotwfhipxwgsabv\"],\"capacity\":{\"minimum\":2086469129,\"maximum\":590497468,\"default\":891271107,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"umljcirvpef\"},{\"meterId\":\"cdveititj\"},{\"meterId\":\"s\"},{\"meterId\":\"zaj\"}],\"capabilities\":[{\"name\":\"jhwjuyxx\",\"value\":\"xqvmvuay\"},{\"name\":\"uadx\",\"value\":\"xeqbwp\"},{\"name\":\"tghyksarcdr\",\"value\":\"xsl\"}]}],\"provisioningState\":\"Failed\"},\"id\":\"zladltxkpbq\",\"name\":\"v\",\"type\":\"dqqjwkrhwzdano\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response = manager.skus() - .createOrUpdateNestedResourceTypeThirdWithResponse("qggjhf", "bxrqrkijp", "uqlsdx", "qztvx", "mwwmjswenaww", - "me", - new SkuResourceInner().withProperties(new SkuResourceProperties() - .withSkuSettings(Arrays.asList(new SkuSetting().withName("qioulndhzyoeojht") - .withTier("lhsvidmytzlnglxp") - .withSize("vyoanfbcswqagywv") - .withFamily("igvjrktp") - .withKind("eukyaw") - .withLocations(Arrays.asList("mwhqnucsklh", "i")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("tdlpbn"), - new SkuLocationInfo().withLocation("njg"))) - .withRequiredQuotaIds(Arrays.asList("sv", "zfcpuoeedwjcc", "klhsyekrdrenxol", "i")) - .withRequiredFeatures(Arrays.asList("qbeiv")) - .withCapacity(new SkuSettingCapacity().withMinimum(950141294) - .withMaximum(94235072) - .withDefaultProperty(2054893353) - .withScaleType(SkuScaleType.MANUAL)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("rlpunytjlkesmmpa"), - new SkuCost().withMeterId("hubt"))) - .withCapabilities(Arrays.asList(new SkuCapability().withName("e").withValue("niiwllbvgwz"), - new SkuCapability().withName("fftedousnktj").withValue("gravaqogfkbebauz"))))) - .withProvisioningState(ProvisioningState.CREATING)), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("n", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("be", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("gis", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("wnykdidjchlrmpw", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("ofldseacdhz", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("brfgdrwji", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("dqntycnawthv", - response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("cehokw", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("ukoila", response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(111210342, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(844410077, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(518669807, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, - response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("p", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("tvmcly", response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("mffhmjpddnyxfzuv", - response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.FAILED, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 8ecfd8fd2098..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuCapability; -import com.azure.resourcemanager.providerhub.models.SkuCost; -import com.azure.resourcemanager.providerhub.models.SkuLocationInfo; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuResourceProperties; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import com.azure.resourcemanager.providerhub.models.SkuSetting; -import com.azure.resourcemanager.providerhub.models.SkuSettingCapacity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"utpum\",\"tier\":\"wjfl\",\"size\":\"ynbpvzlqywauy\",\"family\":\"jckhmocgj\",\"kind\":\"gouarhwvixqq\",\"locations\":[\"jkyb\"],\"locationInfo\":[{\"location\":\"clrvtzqnrbctbh\"}],\"requiredQuotaIds\":[\"xpc\",\"rdnyeita\",\"eq\",\"dynzjahwr\"],\"requiredFeatures\":[\"mzczfkicee\",\"saaxwspca\",\"ikhfjqebglcxk\",\"gzzromv\"],\"capacity\":{\"minimum\":1816993869,\"maximum\":990994976,\"default\":667896708,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"fsvpink\"}],\"capabilities\":[{\"name\":\"tqtdis\",\"value\":\"xspvckojazb\"},{\"name\":\"gspftesu\",\"value\":\"zpvpvdyly\"},{\"name\":\"covqseusrfjbdxzf\",\"value\":\"nxmlbmuoswk\"},{\"name\":\"mdihdcy\",\"value\":\"yzlwhbwzjnufzrf\"}]},{\"name\":\"m\",\"tier\":\"gnnbzrtf\",\"size\":\"dzuubjtvgjsxm\",\"family\":\"jjvavdpww\",\"kind\":\"tdp\",\"locations\":[\"tsffo\"],\"locationInfo\":[{\"location\":\"nmhkscauwaz\"},{\"location\":\"gwd\"},{\"location\":\"riwgybjp\"},{\"location\":\"zokscvg\"}],\"requiredQuotaIds\":[\"x\",\"gbyfgwe\",\"qkjvxprwpxsoohu\",\"xlcskltez\"],\"requiredFeatures\":[\"ggzlf\"],\"capacity\":{\"minimum\":1280061028,\"maximum\":1441272490,\"default\":2110152605,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"mdylperp\"},{\"meterId\":\"lttjzgcz\"},{\"meterId\":\"cmfpfbodet\"}],\"capabilities\":[{\"name\":\"rgvtsh\",\"value\":\"vftwaiv\"}]}],\"provisioningState\":\"Canceled\"},\"id\":\"kevz\",\"name\":\"jypanhxmpdxxzet\",\"type\":\"wzjwotnxlkfhg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response - = manager.skus() - .define("xmolpcqydeyk") - .withExistingResourcetypeRegistration("yrgkoekv", "wxxyxhighctx") - .withProperties( - new SkuResourceProperties() - .withSkuSettings( - Arrays - .asList( - new SkuSetting().withName("ic") - .withTier("frjeizikgqaboohx") - .withSize("sgyc") - .withFamily("xrmdvewuyqaeohpj") - .withKind("ejkbvhhdaurgho") - .withLocations(Arrays.asList("exbkhx", "xjoezlqxrkdknko", "ektm")) - .withLocationInfo( - Arrays.asList(new SkuLocationInfo().withLocation("omtzamicb"))) - .withRequiredQuotaIds(Arrays.asList("cdgzseznux", "euairaabmdlqjb")) - .withRequiredFeatures(Arrays.asList("f", "xlhupmomihzbdnp", "pkcdpreyxely")) - .withCapacity(new SkuSettingCapacity().withMinimum(1691730280) - .withMaximum(560856986) - .withDefaultProperty(1940675746) - .withScaleType(SkuScaleType.AUTOMATIC)) - .withCosts(Arrays.asList( - new SkuCost().withMeterId("jyg"), - new SkuCost().withMeterId("sfxrkbhammgm"))) - .withCapabilities(Arrays.asList( - new SkuCapability().withName("efgvqcp").withValue("wjgquxweyslandkd"), - new SkuCapability().withName("djhunhghcgawnr").withValue("nquoxsotireimse"), - new SkuCapability().withName("bfsx").withValue("tcyilbvz"), - new SkuCapability().withName("mxcjzlquzexokjx").withValue("bjvbzinzab"))), - new SkuSetting().withName("mvoglj") - .withTier("lpgidn") - .withSize("ehaqidoyzltgio") - .withFamily("oqpe") - .withKind("aeapfsergd") - .withLocations(Arrays.asList("qnacyheq")) - .withLocationInfo(Arrays.asList(new SkuLocationInfo().withLocation("qq"), - new SkuLocationInfo().withLocation("cjubkhjozfymcwm"))) - .withRequiredQuotaIds(Arrays.asList("yvqyvliqiips", "jbsv")) - .withRequiredFeatures(Arrays.asList("ieswhddzydisn", "epywyjlnldpxottd", "i")) - .withCapacity(new SkuSettingCapacity().withMinimum(1476716256) - .withMaximum(635013372) - .withDefaultProperty(1061804775) - .withScaleType(SkuScaleType.MANUAL)) - .withCosts(Arrays.asList(new SkuCost().withMeterId("ee"), - new SkuCost().withMeterId("iphryvcjwqwo"), - new SkuCost().withMeterId("sratjhdhzyb"))) - .withCapabilities(Arrays.asList( - new SkuCapability().withName("jhfrzgdkkagv").withValue("ukhsusmmorf"))))) - .withProvisioningState(ProvisioningState.ROLLOUT_IN_PROGRESS)) - .create(); - - Assertions.assertEquals("utpum", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("wjfl", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("ynbpvzlqywauy", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("jckhmocgj", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("gouarhwvixqq", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("jkyb", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("clrvtzqnrbctbh", - response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("xpc", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("mzczfkicee", response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1816993869, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(990994976, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(667896708, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("fsvpink", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("tqtdis", response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("xspvckojazb", - response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.CANCELED, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstWithResponseMockTests.java deleted file mode 100644 index a363d83bb9b3..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeFirstWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusDeleteNestedResourceTypeFirstWithResponseMockTests { - @Test - public void testDeleteNestedResourceTypeFirstWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.skus() - .deleteNestedResourceTypeFirstWithResponse("ykglt", "gxhqfgqkayejs", "tlgflwfgz", "iucijjcea", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondWithResponseMockTests.java deleted file mode 100644 index 347c5f3776f2..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeSecondWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusDeleteNestedResourceTypeSecondWithResponseMockTests { - @Test - public void testDeleteNestedResourceTypeSecondWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.skus() - .deleteNestedResourceTypeSecondWithResponse("rwvaexhdc", "rceqnkbrupob", "hdmljz", "cvumepjpbi", - "nzpphepife", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdWithResponseMockTests.java deleted file mode 100644 index 9a52a19f5584..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteNestedResourceTypeThirdWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusDeleteNestedResourceTypeThirdWithResponseMockTests { - @Test - public void testDeleteNestedResourceTypeThirdWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.skus() - .deleteNestedResourceTypeThirdWithResponse("isgglmvokat", "ztjctibpvbkae", "xsmzygdf", "akw", "eivmak", - "hysowljuxlkbect", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteWithResponseMockTests.java deleted file mode 100644 index 897ccda0cd94..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusDeleteWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.skus().deleteWithResponse("bgd", "xjd", "vjsaqwotm", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstWithResponseMockTests.java deleted file mode 100644 index a3e6b353eac4..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeFirstWithResponseMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusGetNestedResourceTypeFirstWithResponseMockTests { - @Test - public void testGetNestedResourceTypeFirstWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"ksnbksdqhjv\",\"tier\":\"lxeslkhh\",\"size\":\"tcpoqma\",\"family\":\"wqjwgok\",\"kind\":\"ejjjkxybwfdb\",\"locations\":[\"ztensvkzykjtj\",\"nsxfwu\",\"hcdpkupnqrmgj\",\"bpkuwxeoio\"],\"locationInfo\":[{\"location\":\"zfav\"},{\"location\":\"jzwfb\"},{\"location\":\"yay\"}],\"requiredQuotaIds\":[\"fz\",\"bfw\"],\"requiredFeatures\":[\"xmdewsrsxkrplbj\",\"zej\"],\"capacity\":{\"minimum\":1909809376,\"maximum\":936040784,\"default\":19583853,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"brnnhjxsqw\"},{\"meterId\":\"hqkb\"}],\"capabilities\":[{\"name\":\"t\",\"value\":\"ozycy\"},{\"name\":\"iqyhgfse\",\"value\":\"zlex\"},{\"name\":\"sfledyn\",\"value\":\"jpziu\"}]},{\"name\":\"fbzkk\",\"tier\":\"nhqs\",\"size\":\"ljselp\",\"family\":\"bafvafhlbylcc\",\"kind\":\"vxrh\",\"locations\":[\"fwrsofpltdbmair\"],\"locationInfo\":[{\"location\":\"hfnrac\"}],\"requiredQuotaIds\":[\"qigtuujwouhdaws\",\"grbjbxsjybvitvqk\",\"y\",\"znumtggmuwdchoz\"],\"requiredFeatures\":[\"fexl\",\"xn\"],\"capacity\":{\"minimum\":1586028393,\"maximum\":1905705481,\"default\":1190155426,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"a\"},{\"meterId\":\"lnuwiguy\"}],\"capabilities\":[{\"name\":\"kwph\",\"value\":\"xzcwxhmpejt\"},{\"name\":\"ke\",\"value\":\"aonwivkcqhrxh\"},{\"name\":\"knlccrmmkyup\",\"value\":\"jubyqjfkakfq\"},{\"name\":\"rke\",\"value\":\"yildudxjascow\"}]},{\"name\":\"f\",\"tier\":\"kpdxphlk\",\"size\":\"nmgzvyfijdkzuqnw\",\"family\":\"thuqolyahluq\",\"kind\":\"ulsutrjbhxy\",\"locations\":[\"y\",\"ezvqq\"],\"locationInfo\":[{\"location\":\"rftb\"},{\"location\":\"ve\"},{\"location\":\"reuquowtljvf\"},{\"location\":\"hreagk\"}],\"requiredQuotaIds\":[\"vrqtvbc\"],\"requiredFeatures\":[\"lmdgglmepjp\",\"s\"],\"capacity\":{\"minimum\":557010764,\"maximum\":300751164,\"default\":737003568,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"n\"},{\"meterId\":\"afp\"},{\"meterId\":\"ylkvecjuj\"},{\"meterId\":\"ngoadyedmzr\"}],\"capabilities\":[{\"name\":\"oknub\",\"value\":\"oitpkpztrgdgx\"},{\"name\":\"coqra\",\"value\":\"wugyx\"},{\"name\":\"qi\",\"value\":\"we\"}]},{\"name\":\"alwvskbu\",\"tier\":\"acaqtyltcoqcu\",\"size\":\"dsxzakuejkmvb\",\"family\":\"tjo\",\"kind\":\"cvovjufyc\",\"locations\":[\"lbemyej\",\"riuxegthortuda\"],\"locationInfo\":[{\"location\":\"jfel\"}],\"requiredQuotaIds\":[\"pptcbgqnzmnhii\",\"ialwc\",\"gckbb\",\"ccgzpraoxnyu\"],\"requiredFeatures\":[\"tsgftipwcxbyubh\"],\"capacity\":{\"minimum\":953608093,\"maximum\":1038921387,\"default\":1572693633,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"hza\"},{\"meterId\":\"ccnuhiig\"},{\"meterId\":\"yl\"}],\"capabilities\":[{\"name\":\"gvxvatv\",\"value\":\"rkdlb\"},{\"name\":\"bqxvhcsyhzlwxae\",\"value\":\"ov\"},{\"name\":\"rexdndsbd\",\"value\":\"ead\"}]}],\"provisioningState\":\"Created\"},\"id\":\"mwntopagttmvmma\",\"name\":\"oaq\",\"type\":\"lkjztjiuazjc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response = manager.skus() - .getNestedResourceTypeFirstWithResponse("wllcolsr", "xaptefhexcgjok", "ljnhvlqj", "ek", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ksnbksdqhjv", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("lxeslkhh", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("tcpoqma", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("wqjwgok", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("ejjjkxybwfdb", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("ztensvkzykjtj", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("zfav", response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("fz", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("xmdewsrsxkrplbj", - response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1909809376, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(936040784, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(19583853, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, - response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("brnnhjxsqw", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("t", response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("ozycy", response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.CREATED, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondWithResponseMockTests.java deleted file mode 100644 index 7f31245680c9..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeSecondWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusGetNestedResourceTypeSecondWithResponseMockTests { - @Test - public void testGetNestedResourceTypeSecondWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"ogjwpindedvabbxb\",\"tier\":\"edeilb\",\"size\":\"wfcfxzirzz\",\"family\":\"vwypusuvjsl\",\"kind\":\"wci\",\"locations\":[\"sllfryvdmvxad\",\"acfrgna\",\"bab\"],\"locationInfo\":[{\"location\":\"ktyjmf\"},{\"location\":\"zlfsyqkfrbzgowo\"}],\"requiredQuotaIds\":[\"je\"],\"requiredFeatures\":[\"xnyqgxhlusr\"],\"capacity\":{\"minimum\":219417114,\"maximum\":135967661,\"default\":1468483041,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"bjqvls\"},{\"meterId\":\"mywzashxgonoy\"},{\"meterId\":\"fq\"},{\"meterId\":\"puby\"}],\"capabilities\":[{\"name\":\"lkfk\",\"value\":\"ebgvo\"},{\"name\":\"e\",\"value\":\"tuoqujlyegqavni\"}]}],\"provisioningState\":\"Deleting\"},\"id\":\"qqbtny\",\"name\":\"pylx\",\"type\":\"bf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response = manager.skus() - .getNestedResourceTypeSecondWithResponse("lijjjrtvam", "a", "zknxkv", "cxetyvkunmignoh", "k", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ogjwpindedvabbxb", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("edeilb", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("wfcfxzirzz", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("vwypusuvjsl", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("wci", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("sllfryvdmvxad", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("ktyjmf", response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("je", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("xnyqgxhlusr", response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(219417114, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(135967661, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1468483041, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, - response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("bjqvls", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("lkfk", response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("ebgvo", response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.DELETING, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdWithResponseMockTests.java deleted file mode 100644 index f18d642fbe03..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetNestedResourceTypeThirdWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusGetNestedResourceTypeThirdWithResponseMockTests { - @Test - public void testGetNestedResourceTypeThirdWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"gqphrgfnzhctmjts\",\"tier\":\"pbcbcpzar\",\"size\":\"eqacd\",\"family\":\"tz\",\"kind\":\"ypefcpczshnuqnda\",\"locations\":[\"pfkhuytuszxhmt\",\"tvegwqiukvzwy\",\"wtthaokgksk\",\"i\"],\"locationInfo\":[{\"location\":\"shajqf\"},{\"location\":\"kpeexpgeumilh\"},{\"location\":\"uitrdexyiono\"}],\"requiredQuotaIds\":[\"nbdbzsxcwqqr\"],\"requiredFeatures\":[\"cbbprtugav\",\"zbcyksiv\",\"fogdrtbfcm\"],\"capacity\":{\"minimum\":1811675094,\"maximum\":2081946635,\"default\":1554937222,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"sgmbawvif\"}],\"capabilities\":[{\"name\":\"eci\",\"value\":\"hocjxwkloozrv\"},{\"name\":\"xvcmufunlcp\",\"value\":\"xvi\"},{\"name\":\"yeyng\",\"value\":\"g\"},{\"name\":\"rquv\",\"value\":\"ygg\"}]},{\"name\":\"pmcrdcuelj\",\"tier\":\"ahxm\",\"size\":\"ryarvsxzqb\",\"family\":\"cjkay\",\"kind\":\"thzodubtlmjtgbl\",\"locations\":[\"kkfmkmfdjxyxgb\",\"kqvjcteoedlr\"],\"locationInfo\":[{\"location\":\"kk\"},{\"location\":\"pxvjnzd\"},{\"location\":\"vocoj\"},{\"location\":\"pcnab\"}],\"requiredQuotaIds\":[\"snggytexvzilmhiv\",\"kwwwnckn\",\"zdajlskzptjxu\",\"weucyrth\"],\"requiredFeatures\":[\"ehmcgcje\",\"n\",\"ehokamvfej\",\"qnttmbq\"],\"capacity\":{\"minimum\":2132595349,\"maximum\":623050999,\"default\":1163492661,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"ysthhza\"},{\"meterId\":\"jfwyyrlhgenuze\"}],\"capabilities\":[{\"name\":\"kvebaqszll\",\"value\":\"zlsmmdqgmihzpim\"},{\"name\":\"qrhnxtminkl\",\"value\":\"gxsvtza\"},{\"name\":\"hzvqnsqktcmbjwz\",\"value\":\"oslpky\"}]},{\"name\":\"tglwkzpgajsqjc\",\"tier\":\"qbmfuvqarwz\",\"size\":\"qreblui\",\"family\":\"bwxsfgtdm\",\"kind\":\"xekr\",\"locations\":[\"qkbud\"],\"locationInfo\":[{\"location\":\"aokbavlyttaaknwf\"},{\"location\":\"ke\"},{\"location\":\"sm\"}],\"requiredQuotaIds\":[\"ujd\",\"gatolekscbctnan\",\"imwbzxpdcldpk\",\"wnsnlaimouxwks\"],\"requiredFeatures\":[\"dmfcoibicziusws\",\"jrkbqsjhbtqqvyfs\",\"yrfwbivq\",\"ogfuyzwvbhlim\"],\"capacity\":{\"minimum\":2144050736,\"maximum\":1240879596,\"default\":713972670,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"kcdrdaasaxxobsm\"},{\"meterId\":\"kwiy\"},{\"meterId\":\"v\"}],\"capabilities\":[{\"name\":\"osrnawnvzmlnkoy\",\"value\":\"sxvjabjqqaxuyvy\"}]},{\"name\":\"cnudndoabhj\",\"tier\":\"xqweu\",\"size\":\"mp\",\"family\":\"smitnsqxtlt\",\"kind\":\"krdpqgfhyrfr\",\"locations\":[\"ldgrcw\",\"cmfcnrjajq\",\"atxjtiel\"],\"locationInfo\":[{\"location\":\"gxxgfb\"},{\"location\":\"mtlpqagyno\"}],\"requiredQuotaIds\":[\"n\",\"calincryqxz\",\"aqzi\"],\"requiredFeatures\":[\"imiymqruqgu\",\"fupetasvv\"],\"capacity\":{\"minimum\":1174654760,\"maximum\":1542001686,\"default\":845105921,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"k\"}],\"capabilities\":[{\"name\":\"yao\",\"value\":\"uzowpuohdkcpr\"},{\"name\":\"ukxrzti\",\"value\":\"chlutixmqru\"},{\"name\":\"jizcbfzmcrunfhiu\",\"value\":\"nmfbc\"}]}],\"provisioningState\":\"NotSpecified\"},\"id\":\"ktkrumzuedky\",\"name\":\"bfvxovqkxiuxq\",\"type\":\"gvqrnhyhlwcj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response = manager.skus() - .getNestedResourceTypeThirdWithResponse("leqirccjclykcgxv", "pjlvczuoda", "punettepdjxq", "skoynuiylpc", - "aewse", "vesk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gqphrgfnzhctmjts", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("pbcbcpzar", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("eqacd", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("tz", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("ypefcpczshnuqnda", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("pfkhuytuszxhmt", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("shajqf", response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("nbdbzsxcwqqr", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("cbbprtugav", response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1811675094, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(2081946635, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1554937222, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("sgmbawvif", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("eci", response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("hocjxwkloozrv", - response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetWithResponseMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetWithResponseMockTests.java deleted file mode 100644 index 28ea55c0a216..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusGetWithResponseMockTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"skuSettings\":[{\"name\":\"oycblevpmc\",\"tier\":\"jy\",\"size\":\"yxlzgs\",\"family\":\"kzzltafhbzf\",\"kind\":\"vwmbjlzqsczpg\",\"locations\":[\"napfdqwowftpt\",\"uwjtks\"],\"locationInfo\":[{\"location\":\"cgqyhleseyq\"},{\"location\":\"hvyeldotj\"},{\"location\":\"dkwisw\"},{\"location\":\"kukjtasb\"}],\"requiredQuotaIds\":[\"spkxkdt\",\"fkndl\",\"vtwknvgmmbugt\"],\"requiredFeatures\":[\"tmqa\",\"kueatgroeshoy\",\"zcbyfq\"],\"capacity\":{\"minimum\":804649244,\"maximum\":597504676,\"default\":551660276,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"uvjmv\"},{\"meterId\":\"mtdwcky\"},{\"meterId\":\"roejnndl\"}],\"capabilities\":[{\"name\":\"uskbrreq\",\"value\":\"n\"},{\"name\":\"ceysfaqeg\",\"value\":\"lwryshwddkvbxgkq\"},{\"name\":\"sybwptdaca\",\"value\":\"vvlfntymtp\"}]},{\"name\":\"iwenazero\",\"tier\":\"rs\",\"size\":\"lsxkd\",\"family\":\"qapfgsdpc\",\"kind\":\"ssmzhhkuui\",\"locations\":[\"q\"],\"locationInfo\":[{\"location\":\"ekvalblhtjq\"},{\"location\":\"qyv\"}],\"requiredQuotaIds\":[\"tae\"],\"requiredFeatures\":[\"zzy\",\"ev\",\"sxivzrrryvei\"],\"capacity\":{\"minimum\":1325191964,\"maximum\":652291548,\"default\":934031835,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"fuzkaftjvvru\"},{\"meterId\":\"wigsyeipqdsm\"}],\"capabilities\":[{\"name\":\"rqgdgkkil\",\"value\":\"plkcsm\"}]}],\"provisioningState\":\"NotSpecified\"},\"id\":\"wtbbaedorvvmqf\",\"name\":\"oygbdgwumgxd\",\"type\":\"dhp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SkuResource response - = manager.skus().getWithResponse("jjk", "ajb", "scgdu", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("oycblevpmc", response.properties().skuSettings().get(0).name()); - Assertions.assertEquals("jy", response.properties().skuSettings().get(0).tier()); - Assertions.assertEquals("yxlzgs", response.properties().skuSettings().get(0).size()); - Assertions.assertEquals("kzzltafhbzf", response.properties().skuSettings().get(0).family()); - Assertions.assertEquals("vwmbjlzqsczpg", response.properties().skuSettings().get(0).kind()); - Assertions.assertEquals("napfdqwowftpt", response.properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("cgqyhleseyq", - response.properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("spkxkdt", response.properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("tmqa", response.properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(804649244, response.properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(597504676, response.properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(551660276, response.properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, - response.properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("uvjmv", response.properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("uskbrreq", response.properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("n", response.properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, response.properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsMockTests.java deleted file mode 100644 index f32d9d5e3b83..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusListByResourceTypeRegistrationsMockTests { - @Test - public void testListByResourceTypeRegistrations() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"skuSettings\":[{\"name\":\"mfalkzazmgok\",\"tier\":\"gjqafkmkrokzr\",\"size\":\"qetwpqrtvaozn\",\"family\":\"ixiezeag\",\"kind\":\"eituugedhfpjs\",\"locations\":[\"mbl\",\"yjdeolctaebfs\",\"rledjcu\"],\"locationInfo\":[{\"location\":\"vtqigdxzvsgeafg\"}],\"requiredQuotaIds\":[\"ehxlzsxezppk\",\"waaeskyfjl\",\"zeqtoyrplixlajml\"],\"requiredFeatures\":[\"uevhamfo\",\"gwb\"],\"capacity\":{\"minimum\":734241168,\"maximum\":1923208881,\"default\":1210825662,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"qx\"},{\"meterId\":\"fqovc\"}],\"capabilities\":[{\"name\":\"bplvfidu\",\"value\":\"ztekxbyjgmsfep\"},{\"name\":\"yihpqadagrh\",\"value\":\"dicxdw\"},{\"name\":\"jfowxwy\",\"value\":\"vcxjsgbipcukdvek\"},{\"name\":\"buhoduchv\",\"value\":\"scrdp\"}]},{\"name\":\"bfdyjduss\",\"tier\":\"szekbh\",\"size\":\"kaaggkreh\",\"family\":\"rnuybffljfii\",\"kind\":\"eoagsqta\",\"locations\":[\"srexxfavs\",\"wudohzilfm\"],\"locationInfo\":[{\"location\":\"kpsimsfeypofqp\"},{\"location\":\"bh\"},{\"location\":\"qgsdr\"},{\"location\":\"mttjxophgerh\"}],\"requiredQuotaIds\":[\"gohtwz\",\"qilrixysfn\"],\"requiredFeatures\":[\"qywwwmhk\",\"uwaedrympmlqoi\",\"hzdue\"],\"capacity\":{\"minimum\":1940319697,\"maximum\":1427203676,\"default\":878808566,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"jdiq\"},{\"meterId\":\"liejhpc\"},{\"meterId\":\"bi\"},{\"meterId\":\"dfsbwceivb\"}],\"capabilities\":[{\"name\":\"pbwxgoooxz\",\"value\":\"rad\"},{\"name\":\"s\",\"value\":\"xknpdgz\"},{\"name\":\"g\",\"value\":\"sugswhgsaod\"}]},{\"name\":\"wwnbafoctohz\",\"tier\":\"quvwsxbgn\",\"size\":\"ervqchoadhrsxqvz\",\"family\":\"pabdsrg\",\"kind\":\"jglzrsubklrxhjnl\",\"locations\":[\"tjdvqydieqqkwa\",\"uwdxvqzxoebwgj\",\"bibanbau\",\"wtzvpakloz\"],\"locationInfo\":[{\"location\":\"zrpejpl\"},{\"location\":\"s\"}],\"requiredQuotaIds\":[\"tttk\"],\"requiredFeatures\":[\"xunrswgkpjhboy\",\"kebhuhkslgw\"],\"capacity\":{\"minimum\":450324708,\"maximum\":427068838,\"default\":215330500,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"cqypz\"},{\"meterId\":\"zufgs\"},{\"meterId\":\"fejyvdwtfxptpqa\"},{\"meterId\":\"amkncfgy\"}],\"capabilities\":[{\"name\":\"snxoc\",\"value\":\"ullojk\"},{\"name\":\"oy\",\"value\":\"g\"},{\"name\":\"wdjuxdbdljzgdy\",\"value\":\"cvuq\"},{\"name\":\"sgzlrqhb\",\"value\":\"nq\"}]},{\"name\":\"gdxwbsfpyxx\",\"tier\":\"lflec\",\"size\":\"inxojjlux\",\"family\":\"hilzzdzzq\",\"kind\":\"uezayov\",\"locations\":[\"qloto\",\"htvwtaz\",\"kcqwwxwjyofgwh\",\"kbtlwljssm\"],\"locationInfo\":[{\"location\":\"nldkp\"}],\"requiredQuotaIds\":[\"gisubxbt\",\"ogfg\",\"iijrykwlefksxq\",\"eazfpxgnmqvzvlu\"],\"requiredFeatures\":[\"aiossscyvaifp\"],\"capacity\":{\"minimum\":353822941,\"maximum\":838955449,\"default\":1585901290,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"sfxtjd\"}],\"capabilities\":[{\"name\":\"ymh\",\"value\":\"v\"}]}],\"provisioningState\":\"TransientFailure\"},\"id\":\"ftteh\",\"name\":\"pboujs\",\"type\":\"kfvvdshxcde\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.skus() - .listByResourceTypeRegistrations("tfjmskdchmaiub", "vlzw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mfalkzazmgok", response.iterator().next().properties().skuSettings().get(0).name()); - Assertions.assertEquals("gjqafkmkrokzr", response.iterator().next().properties().skuSettings().get(0).tier()); - Assertions.assertEquals("qetwpqrtvaozn", response.iterator().next().properties().skuSettings().get(0).size()); - Assertions.assertEquals("ixiezeag", response.iterator().next().properties().skuSettings().get(0).family()); - Assertions.assertEquals("eituugedhfpjs", response.iterator().next().properties().skuSettings().get(0).kind()); - Assertions.assertEquals("mbl", response.iterator().next().properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("vtqigdxzvsgeafg", - response.iterator().next().properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("ehxlzsxezppk", - response.iterator().next().properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("uevhamfo", - response.iterator().next().properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(734241168, - response.iterator().next().properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(1923208881, - response.iterator().next().properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1210825662, - response.iterator().next().properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.NONE, - response.iterator().next().properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("qx", - response.iterator().next().properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("bplvfidu", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("ztekxbyjgmsfep", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.TRANSIENT_FAILURE, - response.iterator().next().properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstMockTests.java deleted file mode 100644 index 9b1b64702fd4..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeFirstMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusListByResourceTypeRegistrationsNestedResourceTypeFirstMockTests { - @Test - public void testListByResourceTypeRegistrationsNestedResourceTypeFirst() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"skuSettings\":[{\"name\":\"trwntfmtbgw\",\"tier\":\"xwnaz\",\"size\":\"rrdreyzjwhset\",\"family\":\"jwzzqseuzu\",\"kind\":\"y\",\"locations\":[\"qhyqqzzdcykey\",\"tewfopazdazgbsq\",\"pew\",\"c\"],\"locationInfo\":[{\"location\":\"mdpv\"},{\"location\":\"zgl\"},{\"location\":\"jbkn\"},{\"location\":\"zcl\"}],\"requiredQuotaIds\":[\"eyowmndcovd\",\"zqauxzan\",\"mk\",\"fruwkud\"],\"requiredFeatures\":[\"pftxudqyeme\"],\"capacity\":{\"minimum\":837268188,\"maximum\":1305142488,\"default\":507713109,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"nee\"},{\"meterId\":\"mjauwcgx\"},{\"meterId\":\"fnohaitran\"},{\"meterId\":\"zerwgudas\"}],\"capabilities\":[{\"name\":\"bvfbngfcocefhpri\",\"value\":\"lfmpztr\"}]},{\"name\":\"ud\",\"tier\":\"hlcdc\",\"size\":\"regp\",\"family\":\"moj\",\"kind\":\"rztnv\",\"locations\":[\"hqrdgrtwmewjzlpy\",\"cf\"],\"locationInfo\":[{\"location\":\"wjcayerzrr\"},{\"location\":\"nsyby\"}],\"requiredQuotaIds\":[\"lwzrg\"],\"requiredFeatures\":[\"l\",\"inkfscj\"],\"capacity\":{\"minimum\":2003402338,\"maximum\":325474754,\"default\":941574835,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"wtltngvmreuptrk\"},{\"meterId\":\"zmijajwo\"},{\"meterId\":\"xfsv\"},{\"meterId\":\"ghmp\"}],\"capabilities\":[{\"name\":\"lslrcigtzjc\",\"value\":\"bxqla\"}]},{\"name\":\"snsso\",\"tier\":\"xpavid\",\"size\":\"ev\",\"family\":\"fcvvy\",\"kind\":\"slpuxgcbdsva\",\"locations\":[\"ptwtrkxgpazwugxy\"],\"locationInfo\":[{\"location\":\"jo\"},{\"location\":\"felhldiuhzzgqlm\"},{\"location\":\"aewzgiudjp\"}],\"requiredQuotaIds\":[\"httqh\",\"mhk\",\"ezsdsuxheq\"],\"requiredFeatures\":[\"ruxspinymmqgwok\",\"ikpazf\",\"mjxuvjipfdvhaxd\"],\"capacity\":{\"minimum\":456970353,\"maximum\":1625333661,\"default\":2097746238,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"dklmvetatlakf\"},{\"meterId\":\"oixwgiksb\"},{\"meterId\":\"vtooxrpo\"}],\"capabilities\":[{\"name\":\"hchgjtnhtukf\",\"value\":\"cihmbfntumeezbxv\"},{\"name\":\"xbnuvwcga\",\"value\":\"gomtm\"},{\"name\":\"zwxuqgovsx\",\"value\":\"wwztj\"},{\"name\":\"mkkhtgfredml\",\"value\":\"cgrllc\"}]}],\"provisioningState\":\"NotSpecified\"},\"id\":\"ovjowazhpabacom\",\"name\":\"yotgkwsxnsrqorc\",\"type\":\"enmvcebxeetq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.skus() - .listByResourceTypeRegistrationsNestedResourceTypeFirst("suenyg", "xcgjtf", "nquktrfnslnlrxs", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("trwntfmtbgw", response.iterator().next().properties().skuSettings().get(0).name()); - Assertions.assertEquals("xwnaz", response.iterator().next().properties().skuSettings().get(0).tier()); - Assertions.assertEquals("rrdreyzjwhset", response.iterator().next().properties().skuSettings().get(0).size()); - Assertions.assertEquals("jwzzqseuzu", response.iterator().next().properties().skuSettings().get(0).family()); - Assertions.assertEquals("y", response.iterator().next().properties().skuSettings().get(0).kind()); - Assertions.assertEquals("qhyqqzzdcykey", - response.iterator().next().properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("mdpv", - response.iterator().next().properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("eyowmndcovd", - response.iterator().next().properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("pftxudqyeme", - response.iterator().next().properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(837268188, - response.iterator().next().properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(1305142488, - response.iterator().next().properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(507713109, - response.iterator().next().properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, - response.iterator().next().properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("nee", - response.iterator().next().properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("bvfbngfcocefhpri", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("lfmpztr", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, - response.iterator().next().properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondMockTests.java deleted file mode 100644 index f2ee77cacf31..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeSecondMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusListByResourceTypeRegistrationsNestedResourceTypeSecondMockTests { - @Test - public void testListByResourceTypeRegistrationsNestedResourceTypeSecond() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"skuSettings\":[{\"name\":\"skx\",\"tier\":\"ansbvriaqg\",\"size\":\"ojrulfuctejrt\",\"family\":\"fjzhxl\",\"kind\":\"bqjr\",\"locations\":[\"vrjeqmtzzbeqrztr\",\"alx\",\"d\"],\"locationInfo\":[{\"location\":\"srwrsnrhpqati\"},{\"location\":\"kkvyanxk\"},{\"location\":\"vcsemsvuvdj\"},{\"location\":\"qxetqmmlivrjjx\"}],\"requiredQuotaIds\":[\"dchpojxlehzl\",\"pgfquwzpwiibelwc\"],\"requiredFeatures\":[\"kwbpjxljtxbusq\",\"bxxn\"],\"capacity\":{\"minimum\":132768417,\"maximum\":972835304,\"default\":298319215,\"scaleType\":\"None\"},\"costs\":[{\"meterId\":\"zpa\"},{\"meterId\":\"secnadbuwqrgxf\"}],\"capabilities\":[{\"name\":\"qiynez\",\"value\":\"ellnkkii\"},{\"name\":\"vmtumxpym\",\"value\":\"jfuaxroqvqpilrgu\"}]},{\"name\":\"canlduwzorxs\",\"tier\":\"x\",\"size\":\"klxymxkqvfqepdxc\",\"family\":\"uubwyvpjb\",\"kind\":\"cpj\",\"locations\":[\"qgi\",\"exkydfb\"],\"locationInfo\":[{\"location\":\"avhuerkjddvrglie\"}],\"requiredQuotaIds\":[\"cvbiiftksdw\",\"dnkefgm\",\"dhcebuv\"],\"requiredFeatures\":[\"db\",\"lzoutbaaqgzekaj\",\"lyzgsnor\"],\"capacity\":{\"minimum\":562724806,\"maximum\":2008025421,\"default\":477935303,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"rxkhlob\"},{\"meterId\":\"vjb\"},{\"meterId\":\"vhdi\"}],\"capabilities\":[{\"name\":\"fluiyuosnuud\",\"value\":\"elvhyibdrqrswh\"},{\"name\":\"uubpyrow\",\"value\":\"joxztfwfqchvczev\"},{\"name\":\"nnctagfyvrt\",\"value\":\"qpemh\"},{\"name\":\"cgkrepdqhqy\",\"value\":\"wqwemvxqabckmze\"}]}],\"provisioningState\":\"MovingResources\"},\"id\":\"nhgr\",\"name\":\"ohtwhlpuzj\",\"type\":\"ceezn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.skus() - .listByResourceTypeRegistrationsNestedResourceTypeSecond("jxcxxq", "dcqjkedwqurc", "ojmrvvxwjongzse", - "qqrsil", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("skx", response.iterator().next().properties().skuSettings().get(0).name()); - Assertions.assertEquals("ansbvriaqg", response.iterator().next().properties().skuSettings().get(0).tier()); - Assertions.assertEquals("ojrulfuctejrt", response.iterator().next().properties().skuSettings().get(0).size()); - Assertions.assertEquals("fjzhxl", response.iterator().next().properties().skuSettings().get(0).family()); - Assertions.assertEquals("bqjr", response.iterator().next().properties().skuSettings().get(0).kind()); - Assertions.assertEquals("vrjeqmtzzbeqrztr", - response.iterator().next().properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("srwrsnrhpqati", - response.iterator().next().properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("dchpojxlehzl", - response.iterator().next().properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("kwbpjxljtxbusq", - response.iterator().next().properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(132768417, - response.iterator().next().properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(972835304, - response.iterator().next().properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(298319215, - response.iterator().next().properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.NONE, - response.iterator().next().properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("zpa", - response.iterator().next().properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("qiynez", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("ellnkkii", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.MOVING_RESOURCES, - response.iterator().next().properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdMockTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdMockTests.java deleted file mode 100644 index 8bb5728059fe..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SkusListByResourceTypeRegistrationsNestedResourceTypeThirdMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.providerhub.ProviderHubManager; -import com.azure.resourcemanager.providerhub.models.ProvisioningState; -import com.azure.resourcemanager.providerhub.models.SkuResource; -import com.azure.resourcemanager.providerhub.models.SkuScaleType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SkusListByResourceTypeRegistrationsNestedResourceTypeThirdMockTests { - @Test - public void testListByResourceTypeRegistrationsNestedResourceTypeThird() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"skuSettings\":[{\"name\":\"krie\",\"tier\":\"gnixxowwzkyfwnw\",\"size\":\"wxeiicrmpepk\",\"family\":\"maxxijvskwsdgkjg\",\"kind\":\"cwrase\",\"locations\":[\"fcvoinwoqar\",\"wyxqiclad\"],\"locationInfo\":[{\"location\":\"davuqmcbyms\"},{\"location\":\"ob\"},{\"location\":\"lquvjezcjumvp\"},{\"location\":\"imioyo\"}],\"requiredQuotaIds\":[\"kmi\"],\"requiredFeatures\":[\"nracli\",\"bfqpspkladyd\",\"nhautwukexzgpmnm\",\"be\"],\"capacity\":{\"minimum\":1689468127,\"maximum\":1109451921,\"default\":1004297288,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"qfp\"}],\"capabilities\":[{\"name\":\"tclg\",\"value\":\"rvwerfwxbsmtb\"}]},{\"name\":\"jj\",\"tier\":\"hci\",\"size\":\"wdv\",\"family\":\"brekqhsqhtf\",\"kind\":\"pqbye\",\"locations\":[\"yqwdqi\"],\"locationInfo\":[{\"location\":\"hg\"}],\"requiredQuotaIds\":[\"txlujkhnjcmr\"],\"requiredFeatures\":[\"mkh\",\"qtwmlmhjnqtqeahj\",\"dvragpokddxejhh\",\"vgua\"],\"capacity\":{\"minimum\":1671331570,\"maximum\":996749819,\"default\":1069997729,\"scaleType\":\"Automatic\"},\"costs\":[{\"meterId\":\"n\"}],\"capabilities\":[{\"name\":\"bvoffb\",\"value\":\"kwvdxa\"},{\"name\":\"xqokmyrlji\",\"value\":\"lzbnobrqlpbcjt\"},{\"name\":\"pzuyudivbxnh\",\"value\":\"qeae\"}]},{\"name\":\"nqelwgdhuru\",\"tier\":\"tzarogatmoljiy\",\"size\":\"pinm\",\"family\":\"fkneerzztrkn\",\"kind\":\"ulugdybnhrxlelfj\",\"locations\":[\"izcpihtdmiw\",\"ekpt\"],\"locationInfo\":[{\"location\":\"ydbjzcqymlcf\"}],\"requiredQuotaIds\":[\"mhsurlgwqkpmm\",\"pstauol\",\"wiubmomsgvv\",\"hvvlrl\"],\"requiredFeatures\":[\"wjjmajnkdflqi\",\"ns\",\"aeqkzfzqxjoshoh\",\"otryegp\"],\"capacity\":{\"minimum\":113232070,\"maximum\":79529746,\"default\":815771409,\"scaleType\":\"Manual\"},\"costs\":[{\"meterId\":\"kbfok\"},{\"meterId\":\"khup\"},{\"meterId\":\"erufgjblcdrmy\"},{\"meterId\":\"cemftzgyykyalu\"}],\"capabilities\":[{\"name\":\"dfqnhttwdowrczfj\",\"value\":\"nnuxxrkkmhm\"}]}],\"provisioningState\":\"Canceled\"},\"id\":\"wempdcifrhju\",\"name\":\"rsulwzp\",\"type\":\"lusnawmhhgzotfr\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ProviderHubManager manager = ProviderHubManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.skus() - .listByResourceTypeRegistrationsNestedResourceTypeThird("angp", "bfaxyxzlbc", "phmsexroq", "ndktxfv", - "nfee", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("krie", response.iterator().next().properties().skuSettings().get(0).name()); - Assertions.assertEquals("gnixxowwzkyfwnw", response.iterator().next().properties().skuSettings().get(0).tier()); - Assertions.assertEquals("wxeiicrmpepk", response.iterator().next().properties().skuSettings().get(0).size()); - Assertions.assertEquals("maxxijvskwsdgkjg", - response.iterator().next().properties().skuSettings().get(0).family()); - Assertions.assertEquals("cwrase", response.iterator().next().properties().skuSettings().get(0).kind()); - Assertions.assertEquals("fcvoinwoqar", - response.iterator().next().properties().skuSettings().get(0).locations().get(0)); - Assertions.assertEquals("davuqmcbyms", - response.iterator().next().properties().skuSettings().get(0).locationInfo().get(0).location()); - Assertions.assertEquals("kmi", - response.iterator().next().properties().skuSettings().get(0).requiredQuotaIds().get(0)); - Assertions.assertEquals("nracli", - response.iterator().next().properties().skuSettings().get(0).requiredFeatures().get(0)); - Assertions.assertEquals(1689468127, - response.iterator().next().properties().skuSettings().get(0).capacity().minimum()); - Assertions.assertEquals(1109451921, - response.iterator().next().properties().skuSettings().get(0).capacity().maximum()); - Assertions.assertEquals(1004297288, - response.iterator().next().properties().skuSettings().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, - response.iterator().next().properties().skuSettings().get(0).capacity().scaleType()); - Assertions.assertEquals("qfp", - response.iterator().next().properties().skuSettings().get(0).costs().get(0).meterId()); - Assertions.assertEquals("tclg", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).name()); - Assertions.assertEquals("rvwerfwxbsmtb", - response.iterator().next().properties().skuSettings().get(0).capabilities().get(0).value()); - Assertions.assertEquals(ProvisioningState.CANCELED, - response.iterator().next().properties().provisioningState()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionLifecycleNotificationSpecificationsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionLifecycleNotificationSpecificationsTests.java deleted file mode 100644 index 8f388bb7a294..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionLifecycleNotificationSpecificationsTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SubscriptionLifecycleNotificationSpecifications; -import com.azure.resourcemanager.providerhub.models.SubscriptionNotificationOperation; -import com.azure.resourcemanager.providerhub.models.SubscriptionStateOverrideAction; -import com.azure.resourcemanager.providerhub.models.SubscriptionTransitioningState; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionLifecycleNotificationSpecificationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionLifecycleNotificationSpecifications model = BinaryData.fromString( - "{\"subscriptionStateOverrideActions\":[{\"state\":\"Warned\",\"action\":\"BillingCancellation\"},{\"state\":\"Deleted\",\"action\":\"NoOp\"}],\"softDeleteTTL\":\"PT215H1M2S\"}") - .toObject(SubscriptionLifecycleNotificationSpecifications.class); - Assertions.assertEquals(SubscriptionTransitioningState.WARNED, - model.subscriptionStateOverrideActions().get(0).state()); - Assertions.assertEquals(SubscriptionNotificationOperation.BILLING_CANCELLATION, - model.subscriptionStateOverrideActions().get(0).action()); - Assertions.assertEquals(Duration.parse("PT215H1M2S"), model.softDeleteTtl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionLifecycleNotificationSpecifications model = new SubscriptionLifecycleNotificationSpecifications() - .withSubscriptionStateOverrideActions(Arrays.asList( - new SubscriptionStateOverrideAction().withState(SubscriptionTransitioningState.WARNED) - .withAction(SubscriptionNotificationOperation.BILLING_CANCELLATION), - new SubscriptionStateOverrideAction().withState(SubscriptionTransitioningState.DELETED) - .withAction(SubscriptionNotificationOperation.NO_OP))) - .withSoftDeleteTtl(Duration.parse("PT215H1M2S")); - model = BinaryData.fromObject(model).toObject(SubscriptionLifecycleNotificationSpecifications.class); - Assertions.assertEquals(SubscriptionTransitioningState.WARNED, - model.subscriptionStateOverrideActions().get(0).state()); - Assertions.assertEquals(SubscriptionNotificationOperation.BILLING_CANCELLATION, - model.subscriptionStateOverrideActions().get(0).action()); - Assertions.assertEquals(Duration.parse("PT215H1M2S"), model.softDeleteTtl()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateOverrideActionTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateOverrideActionTests.java deleted file mode 100644 index 0d93286a186b..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateOverrideActionTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SubscriptionNotificationOperation; -import com.azure.resourcemanager.providerhub.models.SubscriptionStateOverrideAction; -import com.azure.resourcemanager.providerhub.models.SubscriptionTransitioningState; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionStateOverrideActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionStateOverrideAction model - = BinaryData.fromString("{\"state\":\"SuspendedToUnregistered\",\"action\":\"SoftDeleteAllResources\"}") - .toObject(SubscriptionStateOverrideAction.class); - Assertions.assertEquals(SubscriptionTransitioningState.SUSPENDED_TO_UNREGISTERED, model.state()); - Assertions.assertEquals(SubscriptionNotificationOperation.SOFT_DELETE_ALL_RESOURCES, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionStateOverrideAction model - = new SubscriptionStateOverrideAction().withState(SubscriptionTransitioningState.SUSPENDED_TO_UNREGISTERED) - .withAction(SubscriptionNotificationOperation.SOFT_DELETE_ALL_RESOURCES); - model = BinaryData.fromObject(model).toObject(SubscriptionStateOverrideAction.class); - Assertions.assertEquals(SubscriptionTransitioningState.SUSPENDED_TO_UNREGISTERED, model.state()); - Assertions.assertEquals(SubscriptionNotificationOperation.SOFT_DELETE_ALL_RESOURCES, model.action()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateRuleTests.java deleted file mode 100644 index fdd1fa460fc3..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SubscriptionStateRuleTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SubscriptionState; -import com.azure.resourcemanager.providerhub.models.SubscriptionStateRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionStateRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionStateRule model = BinaryData - .fromString("{\"state\":\"NotDefined\",\"allowedActions\":[\"mcdytdxwitxnrj\",\"wgqwgxhn\",\"skxfbk\"]}") - .toObject(SubscriptionStateRule.class); - Assertions.assertEquals(SubscriptionState.NOT_DEFINED, model.state()); - Assertions.assertEquals("mcdytdxwitxnrj", model.allowedActions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionStateRule model = new SubscriptionStateRule().withState(SubscriptionState.NOT_DEFINED) - .withAllowedActions(Arrays.asList("mcdytdxwitxnrj", "wgqwgxhn", "skxfbk")); - model = BinaryData.fromObject(model).toObject(SubscriptionStateRule.class); - Assertions.assertEquals(SubscriptionState.NOT_DEFINED, model.state()); - Assertions.assertEquals("mcdytdxwitxnrj", model.allowedActions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SwaggerSpecificationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SwaggerSpecificationTests.java deleted file mode 100644 index 0bb82754d119..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/SwaggerSpecificationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.SwaggerSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SwaggerSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SwaggerSpecification model = BinaryData.fromString( - "{\"apiVersions\":[\"dwzbaiue\",\"baumnyqupedeoj\",\"a\",\"ckhsmtxpsieb\"],\"swaggerSpecFolderUri\":\"hvpesapskrdqm\"}") - .toObject(SwaggerSpecification.class); - Assertions.assertEquals("dwzbaiue", model.apiVersions().get(0)); - Assertions.assertEquals("hvpesapskrdqm", model.swaggerSpecFolderUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SwaggerSpecification model = new SwaggerSpecification() - .withApiVersions(Arrays.asList("dwzbaiue", "baumnyqupedeoj", "a", "ckhsmtxpsieb")) - .withSwaggerSpecFolderUri("hvpesapskrdqm"); - model = BinaryData.fromObject(model).toObject(SwaggerSpecification.class); - Assertions.assertEquals("dwzbaiue", model.apiVersions().get(0)); - Assertions.assertEquals("hvpesapskrdqm", model.swaggerSpecFolderUri()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentOptionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentOptionsTests.java deleted file mode 100644 index 81637bdd65e2..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentOptionsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.PreflightOption; -import com.azure.resourcemanager.providerhub.models.TemplateDeploymentOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TemplateDeploymentOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TemplateDeploymentOptions model = BinaryData.fromString( - "{\"preflightSupported\":true,\"preflightOptions\":[\"None\",\"ContinueDeploymentOnFailure\",\"None\"]}") - .toObject(TemplateDeploymentOptions.class); - Assertions.assertEquals(true, model.preflightSupported()); - Assertions.assertEquals(PreflightOption.NONE, model.preflightOptions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TemplateDeploymentOptions model = new TemplateDeploymentOptions().withPreflightSupported(true) - .withPreflightOptions(Arrays.asList(PreflightOption.NONE, PreflightOption.CONTINUE_DEPLOYMENT_ON_FAILURE, - PreflightOption.NONE)); - model = BinaryData.fromObject(model).toObject(TemplateDeploymentOptions.class); - Assertions.assertEquals(true, model.preflightSupported()); - Assertions.assertEquals(PreflightOption.NONE, model.preflightOptions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentPolicyTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentPolicyTests.java deleted file mode 100644 index fc4f0b0db347..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TemplateDeploymentPolicyTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.TemplateDeploymentCapabilities; -import com.azure.resourcemanager.providerhub.models.TemplateDeploymentPolicy; -import com.azure.resourcemanager.providerhub.models.TemplateDeploymentPreflightOptions; -import org.junit.jupiter.api.Assertions; - -public final class TemplateDeploymentPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TemplateDeploymentPolicy model - = BinaryData.fromString("{\"capabilities\":\"Default\",\"preflightOptions\":\"TestOnly\"}") - .toObject(TemplateDeploymentPolicy.class); - Assertions.assertEquals(TemplateDeploymentCapabilities.DEFAULT, model.capabilities()); - Assertions.assertEquals(TemplateDeploymentPreflightOptions.TEST_ONLY, model.preflightOptions()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TemplateDeploymentPolicy model - = new TemplateDeploymentPolicy().withCapabilities(TemplateDeploymentCapabilities.DEFAULT) - .withPreflightOptions(TemplateDeploymentPreflightOptions.TEST_ONLY); - model = BinaryData.fromObject(model).toObject(TemplateDeploymentPolicy.class); - Assertions.assertEquals(TemplateDeploymentCapabilities.DEFAULT, model.capabilities()); - Assertions.assertEquals(TemplateDeploymentPreflightOptions.TEST_ONLY, model.preflightOptions()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingMetricTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingMetricTests.java deleted file mode 100644 index 97b7bbac63e6..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingMetricTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ThrottlingMetric; -import com.azure.resourcemanager.providerhub.models.ThrottlingMetricType; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ThrottlingMetricTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ThrottlingMetric model = BinaryData - .fromString("{\"type\":\"NotSpecified\",\"limit\":6851389169185127110,\"interval\":\"PT202H18M55S\"}") - .toObject(ThrottlingMetric.class); - Assertions.assertEquals(ThrottlingMetricType.NOT_SPECIFIED, model.type()); - Assertions.assertEquals(6851389169185127110L, model.limit()); - Assertions.assertEquals(Duration.parse("PT202H18M55S"), model.interval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ThrottlingMetric model = new ThrottlingMetric().withType(ThrottlingMetricType.NOT_SPECIFIED) - .withLimit(6851389169185127110L) - .withInterval(Duration.parse("PT202H18M55S")); - model = BinaryData.fromObject(model).toObject(ThrottlingMetric.class); - Assertions.assertEquals(ThrottlingMetricType.NOT_SPECIFIED, model.type()); - Assertions.assertEquals(6851389169185127110L, model.limit()); - Assertions.assertEquals(Duration.parse("PT202H18M55S"), model.interval()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingRuleTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingRuleTests.java deleted file mode 100644 index 9e8e226188aa..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/ThrottlingRuleTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.ThrottlingMetric; -import com.azure.resourcemanager.providerhub.models.ThrottlingMetricType; -import com.azure.resourcemanager.providerhub.models.ThrottlingRule; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ThrottlingRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ThrottlingRule model = BinaryData.fromString( - "{\"action\":\"gkvtmelmqkrhah\",\"metrics\":[{\"type\":\"NotSpecified\",\"limit\":4311555676641493549,\"interval\":\"PT48H37M31S\"},{\"type\":\"NumberOfResources\",\"limit\":6531016586304771464,\"interval\":\"PT145H31M14S\"},{\"type\":\"NumberOfRequests\",\"limit\":4535829174726898901,\"interval\":\"PT125H13M24S\"}],\"requiredFeatures\":[\"exq\"]}") - .toObject(ThrottlingRule.class); - Assertions.assertEquals("gkvtmelmqkrhah", model.action()); - Assertions.assertEquals(ThrottlingMetricType.NOT_SPECIFIED, model.metrics().get(0).type()); - Assertions.assertEquals(4311555676641493549L, model.metrics().get(0).limit()); - Assertions.assertEquals(Duration.parse("PT48H37M31S"), model.metrics().get(0).interval()); - Assertions.assertEquals("exq", model.requiredFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ThrottlingRule model = new ThrottlingRule().withAction("gkvtmelmqkrhah") - .withMetrics(Arrays.asList( - new ThrottlingMetric().withType(ThrottlingMetricType.NOT_SPECIFIED) - .withLimit(4311555676641493549L) - .withInterval(Duration.parse("PT48H37M31S")), - new ThrottlingMetric().withType(ThrottlingMetricType.NUMBER_OF_RESOURCES) - .withLimit(6531016586304771464L) - .withInterval(Duration.parse("PT145H31M14S")), - new ThrottlingMetric().withType(ThrottlingMetricType.NUMBER_OF_REQUESTS) - .withLimit(4535829174726898901L) - .withInterval(Duration.parse("PT125H13M24S")))) - .withRequiredFeatures(Arrays.asList("exq")); - model = BinaryData.fromObject(model).toObject(ThrottlingRule.class); - Assertions.assertEquals("gkvtmelmqkrhah", model.action()); - Assertions.assertEquals(ThrottlingMetricType.NOT_SPECIFIED, model.metrics().get(0).type()); - Assertions.assertEquals(4311555676641493549L, model.metrics().get(0).limit()); - Assertions.assertEquals(Duration.parse("PT48H37M31S"), model.metrics().get(0).interval()); - Assertions.assertEquals("exq", model.requiredFeatures().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionRolloutConfigurationTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionRolloutConfigurationTests.java deleted file mode 100644 index 3a4b92aec53c..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionRolloutConfigurationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.TrafficRegionRolloutConfiguration; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TrafficRegionRolloutConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrafficRegionRolloutConfiguration model - = BinaryData.fromString("{\"waitDuration\":\"PT219H42M55S\",\"regions\":[\"en\",\"qnzarrwl\",\"uu\"]}") - .toObject(TrafficRegionRolloutConfiguration.class); - Assertions.assertEquals("en", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT219H42M55S"), model.waitDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficRegionRolloutConfiguration model - = new TrafficRegionRolloutConfiguration().withRegions(Arrays.asList("en", "qnzarrwl", "uu")) - .withWaitDuration(Duration.parse("PT219H42M55S")); - model = BinaryData.fromObject(model).toObject(TrafficRegionRolloutConfiguration.class); - Assertions.assertEquals("en", model.regions().get(0)); - Assertions.assertEquals(Duration.parse("PT219H42M55S"), model.waitDuration()); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionsTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionsTests.java deleted file mode 100644 index d772130e1253..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TrafficRegionsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.TrafficRegions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TrafficRegionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrafficRegions model = BinaryData - .fromString("{\"regions\":[\"bihanuf\",\"fcbjysagithxqha\",\"ifpikxwczby\",\"cnpqxuhivyqniwby\"]}") - .toObject(TrafficRegions.class); - Assertions.assertEquals("bihanuf", model.regions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficRegions model = new TrafficRegions() - .withRegions(Arrays.asList("bihanuf", "fcbjysagithxqha", "ifpikxwczby", "cnpqxuhivyqniwby")); - model = BinaryData.fromObject(model).toObject(TrafficRegions.class); - Assertions.assertEquals("bihanuf", model.regions().get(0)); - } -} diff --git a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TypedErrorInfoTests.java b/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TypedErrorInfoTests.java deleted file mode 100644 index 20d3e1fbc224..000000000000 --- a/sdk/providerhub/azure-resourcemanager-providerhub/src/test/java/com/azure/resourcemanager/providerhub/generated/TypedErrorInfoTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.providerhub.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.providerhub.models.TypedErrorInfo; -import org.junit.jupiter.api.Assertions; - -public final class TypedErrorInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TypedErrorInfo model - = BinaryData.fromString("{\"type\":\"qbex\",\"info\":\"datacqibycnojv\"}").toObject(TypedErrorInfo.class); - Assertions.assertEquals("qbex", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TypedErrorInfo model = new TypedErrorInfo().withType("qbex"); - model = BinaryData.fromObject(model).toObject(TypedErrorInfo.class); - Assertions.assertEquals("qbex", model.type()); - } -}